On Tue, Jun 5, 2012 at 1:24 PM, Eli Bendersky eli...@gmail.com wrote:
if an explicit metaclass is given and it is not an instance of
type(), then it is used directly as the metaclass
Could you elaborate on this point? Would it perhaps be clearer to say
if an explicit metaclass is given and
On Tue, Jun 5, 2012 at 10:18 AM, Nick Coghlan ncogh...@gmail.com wrote:
On Tue, Jun 5, 2012 at 1:24 PM, Eli Bendersky eli...@gmail.com wrote:
if an explicit metaclass is given and it is not an instance of
type(), then it is used directly as the metaclass
Could you elaborate on this point?
On Tue, Jun 05, 2012 at 10:20:58AM +0300, Eli Bendersky wrote:
Still, instance of type() is a bit too cryptic for mere mortals, IMHO.
I think that if somebody finds instance of type too cryptic, they
won't have any chance at all to understand metaclasses.
Personally, I think there is a lot
Steven D'Aprano wrote:
On Tue, Jun 05, 2012 at 10:20:58AM +0300, Eli Bendersky wrote:
Still, instance of type() is a bit too cryptic for mere mortals, IMHO.
I think that if somebody finds instance of type too cryptic, they
won't have any chance at all to understand metaclasses.
On 5 Jun 2012, at 09:34, Mark Shannon wrote:
Steven D'Aprano wrote:
On Tue, Jun 05, 2012 at 10:20:58AM +0300, Eli Bendersky wrote:
Still, instance of type() is a bit too cryptic for mere mortals, IMHO.
I think that if somebody finds instance of type too cryptic, they won't
have any chance
On Tue, Jun 5, 2012 at 6:34 PM, Mark Shannon m...@hotpy.org wrote:
In this example the metaclass (ie the class of C) is type (C is int),
even though the declared metaclass is 'silly'.
I assume it is too late to change the name of the 'metaclass' keyword to
'factory', but we could use that
It's actually the pre-decoration class, since the cell is initialised
before the class is passed to the first decorator. I agree it's a little
weird, but I did try to describe it accurately in the new docs.
--
Sent from my phone, thus the relative brevity :)
On Jun 5, 2012 7:52 AM, PJ Eby
On Sun, May 20, 2012 at 4:38 AM, Nick Coghlan ncogh...@gmail.com wrote:
When writing the docs for types.new_class(), I discovered that the
description of the class creation process in the language reference
was not only hard to follow, it was actually *incorrect* when it came
to describing
On Mon, Jun 4, 2012 at 6:15 PM, Nick Coghlan ncogh...@gmail.com wrote:
It's actually the pre-decoration class, since the cell is initialised
before the class is passed to the first decorator. I agree it's a little
weird, but I did try to describe it accurately in the new docs.
I see that now;
On Sun, May 20, 2012 at 10:38 AM, Nick Coghlan ncogh...@gmail.com wrote:
When writing the docs for types.new_class(), I discovered that the
description of the class creation process in the language reference
was not only hard to follow, it was actually *incorrect* when it came
to describing
When writing the docs for types.new_class(), I discovered that the
description of the class creation process in the language reference
was not only hard to follow, it was actually *incorrect* when it came
to describing the algorithm for determining the correct metaclass.
I rewrote the offending
I think there is a small mistake in section 3.3.3.4. Creating the
class object:
After the class object is created, any class decorators included in
the *function* definition are invoked ...
That probaly should be class definition.
Daniel
___
Python-Dev
12 matches
Mail list logo