On 10/09/2013 01:00 AM, Oscar Benjamin wrote:
On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
Another question is: where is the place in which this transformation
occurs? Is it at the parser level, before the dictionary attribute is
gave as argument to the metaclass?
I
On 10/08/2013 06:24 AM, Steven D'Aprano wrote:
On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
In the following case:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise.
In the following case:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise. Should be raising an exception (in order to inform
the user the transformation of the name __a have been
On 10/8/2013 6:13 AM, Marco Buttu wrote:
In the following case:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise.
No one qualified to use such names would do such a thing , so
On 10/08/2013 12:36 PM, Terry Reedy wrote:
On 10/8/2013 6:13 AM, Marco Buttu wrote:
In the following case:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise.
No one qualified to
On 10/8/13 6:13 AM, Marco Buttu wrote:
In the following case:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise. Should be raising an exception (in order to
inform the user the
On 10/08/2013 01:07 PM, Ned Batchelder wrote:
On 10/8/13 6:13 AM, Marco Buttu wrote:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
...
You also get a problem if you do this:
class Foo:
... a = 100
... a = 33
...
Foo.a
33
But
On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
In the following case:
class Foo:
... _Foo__a = 100
... __a = 33
...
Foo._Foo__a
33
I think this behavior, for a user who does not know the convention,
could be a surprise.
Yes, you are correct. It surprised me, and
On 10/8/13 7:15 AM, Marco Buttu wrote:
Also, as Terry mentions, no one has ever assigned the two names you
show,
Sincerely, I can not now if someone has assigned (or will assegne) in
such way...
If you explain more about what you are building, and where this crops up
as a problem, we can
On Oct 8, 2013 2:26 PM, Steven Dapos;Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Tue, 08 Oct 2013 12:13:48 +0200, Marco Buttu wrote:
Another question is: where is the place in which this transformation
occurs? Is it at the parser level, before the dictionary attribute is
gave
10 matches
Mail list logo