[Python-ideas] anonymous object support

Masklinn masklinn at masklinn.net
Tue Jul 26 09:20:44 CEST 2011


On 2011-07-26, at 07:50 , Nick Coghlan wrote:

> On Tue, Jul 26, 2011 at 2:36 PM, Matt Joiner <anacrolix at gmail.com> wrote:
>> Just as a slight aside, is the special case of type() purely for convenience?
>> Aren't the "new-style" ways to do this __class__ and isinstance()?
> 
> Not really - all three do different things:
> 
> 1. type(x) always gives you the true metaclass of x
The true *class*, I think. Although type(type(x)) should give you x's metaclass.




More information about the Python-ideas mailing list