From christianzlong at gmail.com Mon Dec 2 05:21:15 2013 From: christianzlong at gmail.com (Christian Long) Date: Sun, 1 Dec 2013 22:21:15 -0600 Subject: [FoxPUG] December Meeting Message-ID: Hi, Our December meeting is tomorrow, Monday December 2. Find all the details here: http://foxpython.tumblr.com/post/66071250460/december-meeting We look forward to seeing you there. Christian From christianzlong at gmail.com Tue Dec 3 07:43:00 2013 From: christianzlong at gmail.com (Christian Long) Date: Tue, 3 Dec 2013 00:43:00 -0600 Subject: [FoxPUG] December meeting Message-ID: Hi, We had a great meeting this evening. At 7:05, I decided to move the meeting out of the crowded computer lab, and in to a hallway in Halsey. I asked the lab attendant to redirect any late arrivals. My apologies to anyone who missed the meeting because of the move. Here are the meeting notes. http://foxpython.tumblr.com/post/68858982595/december-meeting-notes Thanks to everyone who attended, ad especially to Gabriel for driving all the way up from Columbus. If you didn't attend, you missed a good one :) See you in January http://foxpython.tumblr.com/post/68858765362/january-meeting Christian Long From christianzlong at gmail.com Tue Dec 3 07:52:24 2013 From: christianzlong at gmail.com (Christian Long) Date: Tue, 3 Dec 2013 00:52:24 -0600 Subject: [FoxPUG] Revised November notes Message-ID: Oh, and I revised the notes from November. Thanks Mamdou for being there last month. Christian From christianzlong at gmail.com Tue Dec 3 10:19:57 2013 From: christianzlong at gmail.com (Christian Long) Date: Tue, 3 Dec 2013 03:19:57 -0600 Subject: [FoxPUG] Simple code samples and syntax examples Message-ID: During the meeting, I spoke briefly about functions as first-class objects, which you can pass around and manipulate. I also spoke about decorators, and about the meaning of * and ** in argument lists. Here are the super-simple examples I typed up during the meeting. """ Demonstrate decorators and function objects """ def main(): f1("a") f1("a", 2, 3, r=45) caller(f1, "s", 4,5,6, m=89) h("bla") print(h) def f1(first_argument, *args, **kwargs): print first_argument print args print kwargs print def caller(function_to_call, *args, **kwargs): #print(function_to_call) function_to_call(*args, **kwargs) def function_objects_what_are_they_really(): def a(): pass print a #print b b=a a=None print a print b def a_decorator(function_to_decorate): def wrapper(*args, **kwargs): print("inside wrapped function") print(function_to_decorate) function_to_decorate(*args, **kwargs) return wrapper @a_decorator def h(arg1): print("hi: %s" % arg1) if __name__ == '__main__': main() Here's another little python file with some demonstrations """ Behavior of * and ** in arguments, and in parameter definitions """ def print_some_stuff(a, b, c): print(a) print(b) print(c) print print_some_stuff(1,2,3) # Tuple definitions don't need parens, just commas. The trailing comma # is optional (but awesome). k=4,5,6, # The exact same thing three times print_some_stuff(*k) print_some_stuff(*(4,5,6)) print_some_stuff(4,5,6) l={'a': 35, 'b': 36, "c": 37, } # The exact same thing twice print_some_stuff(**l) print_some_stuff(a=35, b=36, c=37) From cbc at unc.edu Thu Dec 12 20:15:38 2013 From: cbc at unc.edu (Chris Calloway) Date: Thu, 12 Dec 2013 14:15:38 -0500 Subject: [FoxPUG] December meeting In-Reply-To: References: Message-ID: <52AA0B5A.3010608@unc.edu> On 12/3/2013 1:43 AM, Christian Long wrote: > Here are the meeting notes. Wow. Your meetings have more information exchange than my meetings. Good work! A student in the most recent Toronto PyCamp sent me a link to a treasure trove of well done Python tutorial videos I want to share with you: http://www.youtube.com/user/sentdex?feature=watch Also, the dates for Plone Symposium Midwest 2014 have just been announced as June 15-22. I've been asked to bring PyCamp back to Oshkosh for it. So I asked for permission to have a five day PyCamp and it was approved. It will likely start on Friday June 13 or Saturday June 14, depending on which day the actual Symposium program starts (Kim, lemme know). Assuming I can get the same large capacity classroom again, it won't be an unlucky Friday the 13th. It will be your lucky Friday the 13th. Because if you came to the three day PyCamp this year, you'll be able to come to the five day PyCamp at PSM14 for free! I feel that if you came to the three day PyCamp, you were missing out on the full five PyCamp experience, both in pace and coverage. So I'd like to make it up to you by giving you the full five day experience. The only thing I'll ask is, like this year, I anticipate the PyCamp for PSM14 will feature all day catering (breakfast, lunch, and snacks). That costs me $20/person/day, assuming the price doesn't go up before PSM14. So if you are returning to PyCamp for free, and you want to participate in the catering, I'll ask you to pay for that ($100 for the week) for yourself. Otherwise, you can bring your own snacks, drinks, and lunch and have your five day PyCamp be totally free. I'll let you know more soon. -- Sincerely, Chris Calloway http://nccoos.org/Members/cbc office: 3313 Venable Hall phone: (919) 599-3530 mail: Campus Box #3300, UNC-CH, Chapel Hill, NC 27599