----BEGIN CLASS---- [13:29] #startclass [13:29] Roll Call [13:29] Samridhi Agarwal [13:29] Abhishek Singh [13:29] Robin Schubert [13:29] pooja kumari singh [13:29] neha [13:30] Deepika Upadhyay [13:30] Sandesh Patel [13:30] Krishnanand Rai [13:30] Bhavin Gandhi [13:30] Akshay Gaikwad [13:31] Yurii Pylypchuk [13:32] Ashwani Kumar Gupta [13:32] Anyone else? [13:33] I never saw much discussion on the list about the problem I asked to solve using Python. [13:33] Who all did that?> [13:33] Anu kumari Gupta [13:33] me [13:33] I think I did [13:34] The log problem? [13:34] knrai, you were the first, correct? [13:34] anuGupta, Yes [13:34] Yes did [13:34] me [13:34] kushal, I have solved it [13:34] kushal: yeap [13:34] I did [13:34] Have you all discussed it among yourself in the channel? [13:35] roll call : Aniket Uttam [13:35] roll call : Soumam Banerjee [13:36] I think there were one or two versions discussed that I know about [13:36] Okay [13:36] Who all here does not know about Python functions? [13:36] This is the next chapter of the book https://pymbook.readthedocs.io/en/latest/functions.html [13:36] I am wondering if you have already read it or not. [13:37] If not, then please tell me now. [13:37] we can plan accordingly. [13:37] Any? [13:38] ! [13:38] next [13:38] kushal no problem with normal functions but why __name__= "main" [13:38] s/leag/lag [13:39] soumam007, wait for modules to understand [13:39] ok [13:42] ! [13:42] next [13:42] I know about functions but I haven't read that chapter. [13:43] kushal i haven't read. [13:43] kushal that chapter. [13:43] kvy_, so start reading, I will pass some problems after 15-20 minutes [13:44] bhavin192, read it now please [13:44] kushal ok [13:44] kushal, reading. [13:44] everyone please read the chapter once more please, or at least to understand how to write a basic function. [13:44] I can start giving you problems after that. [13:44] ! [13:44] kushal i haven't read this chapter. But i am reading now [13:48] >>> res = sum(234234, 34453546464) [13:48] >>> res [13:48] 34453780698L [13:48] what is this L in last [13:48] of res [13:49] Anyone answer kvy_ please :) [13:49] next [13:49] How does the higher order functions work? Like recursive functions? [13:49] [13:50] kvy_, it means long [13:50] kvy_, I guess I will have to update that from the python2 days [13:50] L stands for long [13:51] ashwanig, any function is another python object, means you can just pass it another function, in that new function just call the what ever function passed across. [13:51] ashwanig got it [13:51] kushal, understood. [13:55] ! [13:55] next [13:56] "*" is needed in order to specify keyword only argument for function, right? [13:58] bhavin192, yes, if you use that, then you can only have keyword based arguments [14:01] bhavin192, Let us wait for few more minutes [14:04] ! [14:04] next [14:04] I just joined can someone please send me the logs. Sorry for interruption [14:05] NikitaK3, we are reading the functions chapter [14:05] ! [14:05] okay thanks kushal [14:06] next [14:06] What is dir in the example of the higher order function? [14:06] Nikita3: https://pymbook.readthedocs.io/en/latest/functions.html [14:06] anuGupta, dir(int) [14:06] anuGupta, try that :) [14:07] Ok [14:08] List of all the inbuilt functions? [14:08] anuGupta, help(dir) [14:09] Thank you yurii [14:10] Got it kushal [14:12] ! [14:12] next [14:13] kushal: In Keyword only argument topic we have use * so it force us to write right keyword of make our argument keyword. [14:13] but what if we want to do that some of our argument become keyword and some remain variable. [14:13] [14:13] kvy_, write a function like https://pymbook.readthedocs.io/en/latest/functions.html#keyword-arguments [14:14] kvy_, mark only the required ones as keyword based [14:14] I mean call them with keywords :) [14:14] ! [14:15] kushal ok got it [14:15] next [14:15] What should we write inside dir() to get list which will contain built in function like __name__ and __main__? [14:16] __name__ or __main__ are not functions [14:16] Then? [14:17] kushal but i want to make my first argument as a keyword and second as a simple variable in same function. [14:18] anuGupta, we will know about them during the modules chapter [14:18] kvy_, you can not do that. [14:18] kushal ok [14:19] kvy_, Don't you think that is useless? [14:21] ashwanig I don't think so because we got any kind of condition. [14:23] ! [14:23] next [14:23] This stand for what [14:23] __name__ == '__main__' [14:23] [14:24] kvy_, keep following this till the modules chapter, we will explain then [14:24] kushal ok [14:25] Or rather people start reading https://pymbook.readthedocs.io/en/latest/modules.html next [14:25] I will take any questions you have [14:28] ! [14:29] next [14:29] do we need to start bars.py program with #!/usr/bin/env python [14:29] nah [14:29] and I should update that [14:30] what means nah :) [14:30] nope [14:31] kushal, but the shebang is not there in bars.py [14:33] ! [14:33] next [14:33] ashwanig, don't write that [14:33] ashwanig - I asked because I used ti start all python programmes with #! [14:33] lst = high(dir, int) what is dir in this calling. [14:33] kushal, okay [14:34] and int too [14:34] [14:35] kushal, are we supposed to do any problem? just came from college. sorry for interruption! [14:35] kvy_, dir is a function and int is data type [14:36] i mean we does't code dir function than from where it comes. [14:36] kvy_, it is a built in function [14:36] ok [14:36] got it [14:39] avik :we are reading https://pymbook.readthedocs.io/en/latest/modules.html [14:40] dir is an inbuilt function that is used to show all the parameters present within an object [14:40] dir([object name]) [14:41] and the list which we are getting due to this command are the parameters of that object itself :) [14:44] ! [14:44] next [14:44] kushal: https://notebooks.azure.com/n/Xb8uxgN1ubI/notebooks/summertraining-Copy1.ipynb [14:45] what is the reason for map function's this behaviour [14:46] [14:46] san-D, taking each item and adding 2 [14:47] kushal: why using list() over map is running func [14:47] can map() not run it's own> [14:47] ?