On Tue, Jun 5, 2012 at 6:34 PM, Mark Shannon 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 terminology i
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
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.
Personal
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
On Tue, Jun 5, 2012 at 10:18 AM, Nick Coghlan wrote:
> On Tue, Jun 5, 2012 at 1:24 PM, Eli Bendersky 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 clea
On Tue, Jun 5, 2012 at 1:24 PM, Eli Bendersky 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 it is not
On Sun, May 20, 2012 at 10:38 AM, Nick Coghlan 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 the algorithm for
On Mon, Jun 4, 2012 at 6:15 PM, Nick Coghlan 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; it might be he
On Sun, May 20, 2012 at 4:38 AM, Nick Coghlan 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 the algorithm for
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" wrote
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
___
Pytho
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 se
12 matches
Mail list logo