Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-28 Thread Stephen J. Turnbull
Terry Reedy writes: > Ok, I won't add them when a function's name actually makes what it does > obvious. But when I have to spend at least a few minutes reading the > body to make sense of it, I will try to add the summary line that I wish > had been there already. +1 That's a *great* rul

[Python-Dev] add new lambda syntax

2013-06-28 Thread Pynix Wang
I want use coffeescript function syntax to write python lambda expression so I modified the Grammar file. ``` atom: ('(' [yield_expr|testlist_comp|vararglist] ')' | '[' [testlist_comp] ']' | '{' [dictorsetmaker] '}' | NAME | NUMBER | STRING+ | '...' | 'None' | 'True' | 'False'

[Python-Dev] Summary of Python tracker Issues

2013-06-28 Thread Python tracker
ACTIVITY SUMMARY (2013-06-21 - 2013-06-28) Python tracker at http://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open4069 (+12) closed 26027 (+34) total 30096 (+46) Open issues wit

Re: [Python-Dev] add new lambda syntax

2013-06-28 Thread Amaury Forgeot d'Arc
2013/6/28 Pynix Wang > I want use coffeescript function syntax to write python lambda expression > so I modified the Grammar file. > > ``` > atom: ('(' [yield_expr|testlist_comp|vararglist] ')' | >'[' [testlist_comp] ']' | >'{' [dictorsetmaker] '}' | >NAME | NUMBER | STRIN

Re: [Python-Dev] add new lambda syntax

2013-06-28 Thread Thomas Wouters
On Fri, Jun 28, 2013 at 7:01 PM, Amaury Forgeot d'Arc wrote: > 2013/6/28 Pynix Wang > >> I want use coffeescript function syntax to write python lambda expression >> so I modified the Grammar file. >> >> ``` >> atom: ('(' [yield_expr|testlist_comp|vararglist] ')' | >>'[' [testlist_comp] '

[Python-Dev] backported Enum

2013-06-28 Thread Jim J. Jewett
(On June 19, 2013) Barry Warsaw wrote about porting mailman from flufl.enum to the stdlib.enum: > Switching from call syntax to getitem syntax for looking up an > enum member by name, e.g. >-delivery_mode = DeliveryMode(data['delivery_mode']) >+delivery_mode = Delivery

Re: [Python-Dev] backported Enum

2013-06-28 Thread Barry Warsaw
On Jun 28, 2013, at 01:07 PM, Jim J. Jewett wrote: >> Switching from getitem syntax to call syntax for looking up an >> enum member by value, e.g. > >>-return self._enum[value] >>+return self._enum(value) > >> Interesting that these two were exactly opposite from flufl.enum

Re: [Python-Dev] backported Enum

2013-06-28 Thread Ethan Furman
On 06/28/2013 01:07 PM, Jim J. Jewett wrote: (On June 19, 2013) Barry Warsaw wrote about porting mailman from flufl.enum to the stdlib.enum: Switching from call syntax to getitem syntax for looking up an enum member by name, e.g. -delivery_mode = DeliveryMode(data['delivery_mode'

Re: [Python-Dev] backported Enum

2013-06-28 Thread Guido van Rossum
On Fri, Jun 28, 2013 at 1:30 PM, Ethan Furman wrote: > On 06/28/2013 01:07 PM, Jim J. Jewett wrote: >> (On June 19, 2013) Barry Warsaw wrote about porting mailman from >>> Switching from getitem syntax to call syntax for looking up an >>> enum member by value, e.g. >>> >>> -return self

Re: [Python-Dev] backported Enum

2013-06-28 Thread Barry Warsaw
On Jun 28, 2013, at 02:11 PM, Guido van Rossum wrote: >I have no idea why it was the other way around in flufl.enum, but >admittedly neither of these rules are absolute, and it's possible that >flufl.enum just evolved that way without conscious decisions, or that >it came from taking a different p

Re: [Python-Dev] Reminder: an oft-forgotten rule about docstring formatting (PEP 257)

2013-06-28 Thread Terry Reedy
On 6/26/2013 9:56 PM, Guido van Rossum wrote: PEP 257 says this on the formatting of multi-line docstrings: """ Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description. fileinput has docstrings like