Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Lennart Regebro
On Mon, Jan 28, 2013 at 11:17 PM, Steven D'Aprano wrote: > On 28/01/13 23:52, Antoine Pitrou wrote: >> >> Le Mon, 28 Jan 2013 22:31:29 +1000, >> Nick Coghlan a écrit : >>> >>> > 6. Under "New collections" > > Why both lists and sets? Because pytz did it. But yes, you ar

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Steven D'Aprano
On 28/01/13 23:52, Antoine Pitrou wrote: Le Mon, 28 Jan 2013 22:31:29 +1000, Nick Coghlan a écrit : 6. Under "New collections" Why both lists and sets? Because pytz did it. But yes, you are right, an ordered set is a better solution. Baseing it on OrderedDict seems like a hack, though. I c

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Nick Coghlan
On Mon, Jan 28, 2013 at 10:52 PM, Antoine Pitrou wrote: > Le Mon, 28 Jan 2013 22:31:29 +1000, > Nick Coghlan a écrit : >> >> >> 6. Under "New collections" >> >> >> >> Why both lists and sets? >> > >> > Because pytz did it. But yes, you are right, an ordered set is a >> > better solution. Baseing

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Antoine Pitrou
Le Mon, 28 Jan 2013 22:31:29 +1000, Nick Coghlan a écrit : > > >> 6. Under "New collections" > >> > >> Why both lists and sets? > > > > Because pytz did it. But yes, you are right, an ordered set is a > > better solution. Baseing it on OrderedDict seems like a hack, > > though. I could implement

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Nick Coghlan
On Mon, Jan 28, 2013 at 10:06 PM, Lennart Regebro wrote: > On Sat, Jan 26, 2013 at 10:38 AM, Nick Coghlan wrote: >> 2. Under "New class DstTzInfo" >> >> This will be a subclass of "tzinfo" rather than "zoneinfo" (which is >> not a class). Given that this is a *concrete* subclass, you may want >>

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Lennart Regebro
On Sat, Jan 26, 2013 at 10:38 AM, Nick Coghlan wrote: > 2. Under "New class DstTzInfo" > > This will be a subclass of "tzinfo" rather than "zoneinfo" (which is > not a class). Given that this is a *concrete* subclass, you may want > to consider the name "DstTimezone", which would be slightly more

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Lennart Regebro
On Mon, Jan 28, 2013 at 11:26 AM, Antoine Pitrou wrote: > Will non-ambiguous shorthands such as "Warsaw" and "GMT" be accepted? pytz accepts GMT, so that will work. Otherwise no. > NonExistentTimeError can also be raised for is_dst=True and > is_dst=False, no? Or am I misunderstanding the semant

Re: [Python-Dev] PEP 431 Updates

2013-01-28 Thread Antoine Pitrou
Hi, Le Mon, 28 Jan 2013 11:01:05 +0100, Lennart Regebro a écrit : > This function takes a name string that must be a string specifying a > valid zoneinfo time zone, i.e. "US/Eastern", "Europe/Warsaw" or > "Etc/GMT". Will non-ambiguous shorthands such as "Warsaw" and "GMT" be accepted? > The ``