On Tue, May 7, 2013 at 6:00 PM, Steven D'Aprano wrote:
> On 07/05/13 23:34, Eli Bendersky wrote:
>
>> One of the contended issues with PEP 435 on which Guido pronounced was the
>> functional API, that allows created enumerations dynamically in a manner
>> similar to namedtuple:
>>
>>Color = E
On 07/05/13 23:34, Eli Bendersky wrote:
One of the contended issues with PEP 435 on which Guido pronounced was the
functional API, that allows created enumerations dynamically in a manner
similar to namedtuple:
Color = Enum('Color', 'red blue green')
The biggest complaint reported against th
On 05/07/2013 08:47 AM, Eli Bendersky wrote:
def Color = Enum('red green blue')
It's an interesting idea, but as NIck suggested we should probably
discuss it on the python-ideas list. [...]
A special syntax raises more questions though, because it has to be
defined very precisely. Feel
On Tue, 7 May 2013 09:34:45 +0200
Victor Stinner wrote:
> http://buildbot.python.org/all/waterfall?category=3.x.stable
>
> x86 Windows Server 2003 [SB] 3.x: 3 tests failed, test___all__ test_gc
> test_ssl
> x86 Windows7 3.x: 3 tests failed, test___all__ test_gc test_ssl
> x86 Gentoo Non-Debug 3.
On Tue, May 7, 2013 at 8:34 AM, Eli Bendersky wrote:
> According to an earlier discussion, this is works on CPython, PyPy and
> Jython, but not on IronPython. The alternative that works everywhere is to
> define the Enum like this:
>
> Color = Enum('the_module.Color', 'red blue green')
>
> The
On Tue, May 7, 2013 at 9:14 AM, Antoine Pitrou wrote:
> Le Tue, 7 May 2013 08:44:46 -0700,
> Eli Bendersky a écrit :
> > > > 4) Using _getframe(N) here seems like an overkill to me.
> > >
> > > It's not just overkill, it's fragile - it only works if you call the
> > > constructor directly. If y
Le Tue, 7 May 2013 08:44:46 -0700,
Eli Bendersky a écrit :
> > > 4) Using _getframe(N) here seems like an overkill to me.
> >
> > It's not just overkill, it's fragile - it only works if you call the
> > constructor directly. If you use a convenience function in a utility
> > module, it will try t
On 05/07/2013 08:03 AM, Nick Coghlan wrote:
On Tue, May 7, 2013 at 11:34 PM, Eli Bendersky wrote:
4) Using _getframe(N) here seems like an overkill to me.
It's not just overkill, it's fragile - it only works if you call the
constructor directly. If you use a convenience function in a utility
On Tue, May 7, 2013 at 8:35 AM, Piotr Duda wrote:
> 2013/5/7 Ethan Furman :
> > On 05/07/2013 08:01 AM, Piotr Duda wrote:
> >>
> >> 2013/5/7 Ethan Furman :
> >>>
> >>> On 05/07/2013 07:48 AM, Piotr Duda wrote:
>
>
>
> What about adding simple syntax (I proposed this earlier, b
On 2013-05-07, at 17:03 , Nick Coghlan wrote:
>
> Specifically, what I'm talking about is some kind of implicit context
> similar to the approach the decimal module uses to control operations
> on Decimal instances.
Wouldn't it be a good occasion to add actual, full-fledged and correctly
implemen
On Tue, May 7, 2013 at 8:03 AM, Nick Coghlan wrote:
> On Tue, May 7, 2013 at 11:34 PM, Eli Bendersky wrote:
> > One of the contended issues with PEP 435 on which Guido pronounced was
> the
> > functional API, that allows created enumerations dynamically in a manner
> > similar to namedtuple:
> >
2013/5/7 Ethan Furman :
> On 05/07/2013 08:01 AM, Piotr Duda wrote:
>>
>> 2013/5/7 Ethan Furman :
>>>
>>> On 05/07/2013 07:48 AM, Piotr Duda wrote:
What about adding simple syntax (I proposed this earlier, but no one
commented) that take care of assigning name and module, s
On 05/07/2013 08:01 AM, Piotr Duda wrote:
2013/5/7 Ethan Furman :
On 05/07/2013 07:48 AM, Piotr Duda wrote:
What about adding simple syntax (I proposed this earlier, but no one
commented) that take care of assigning name and module, something
like:
def name = expression
which would be rough
Le Wed, 8 May 2013 01:03:38 +1000,
Nick Coghlan a écrit :
>
> What if there was a variant of the class statement that bound the
> result of a function call rather than using the normal syntax:
>
> class Animal from enum.Enum(members="dog cat bear")
Apparently you're trying hard to invent sy
On Wed, May 8, 2013 at 12:53 AM, Ethan Furman wrote:
> On 05/07/2013 07:48 AM, Piotr Duda wrote:
>>
>>
>> What about adding simple syntax (I proposed this earlier, but no one
>> commented) that take care of assigning name and module, something
>> like:
>>
>> def name = expression
>>
>> which would
On Tue, May 7, 2013 at 11:34 PM, Eli Bendersky wrote:
> One of the contended issues with PEP 435 on which Guido pronounced was the
> functional API, that allows created enumerations dynamically in a manner
> similar to namedtuple:
>
> Color = Enum('Color', 'red blue green')
>
> The biggest compl
2013/5/7 Ethan Furman :
> On 05/07/2013 07:48 AM, Piotr Duda wrote:
>>
>>
>> What about adding simple syntax (I proposed this earlier, but no one
>> commented) that take care of assigning name and module, something
>> like:
>>
>> def name = expression
>>
>> which would be rough equivalent for:
>>
>
On 05/07/2013 07:48 AM, Piotr Duda wrote:
What about adding simple syntax (I proposed this earlier, but no one
commented) that take care of assigning name and module, something
like:
def name = expression
which would be rough equivalent for:
name = expression
name.__name__ = 'name'
name.__mod
2013/5/7 Eli Bendersky :
>
> 4) Using _getframe(N) here seems like an overkill to me. What we really need
> is just the module in which the current execution currently is (i.e. the
> metaclass's __new__ in our case). Would it make sense to add a new function
> somewhere in the stdlib of 3.4 (in sys
On Tue, May 7, 2013 at 6:27 PM, Armin Rigo wrote:
> Hi Antoine,
>
> On Tue, May 7, 2013 at 8:25 AM, Antoine Pitrou wrote:
>> For me, a patch that mandated general-purpose containers (list, dict,
>> etc.) respect object identity would be ok.
>
> Thanks, that's also my opinion.
>
> In PyPy's approa
One of the contended issues with PEP 435 on which Guido pronounced was the
functional API, that allows created enumerations dynamically in a manner
similar to namedtuple:
Color = Enum('Color', 'red blue green')
The biggest complaint reported against this API is interaction with pickle.
As promi
On 05/06/2013 10:18 PM, Tim Delaney wrote:
On 7 May 2013 15:14, Tim Delaney mailto:timothy.c.dela...@gmail.com>> wrote:
Unfortunately, if you subclass AutoNumber from IntEnum it breaks.
-- Run Python3 --
Traceback (most recent call last):
File "D:\home\repos\m
Hi Antoine,
On Tue, May 7, 2013 at 8:25 AM, Antoine Pitrou wrote:
> For me, a patch that mandated general-purpose containers (list, dict,
> etc.) respect object identity would be ok.
Thanks, that's also my opinion.
In PyPy's approach, in trying to emulate CPython vs. trying to
convince users th
http://buildbot.python.org/all/waterfall?category=3.x.stable
x86 Windows Server 2003 [SB] 3.x: 3 tests failed, test___all__ test_gc test_ssl
x86 Windows7 3.x: 3 tests failed, test___all__ test_gc test_ssl
x86 Gentoo Non-Debug 3.x: 3 tests failed, test_logging
test_multiprocessing test_urllib2net
x
24 matches
Mail list logo