A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-December/041361.html below:

[Python-Dev] Re: Capabilities - published interfaces

[Python-Dev] Re: Capabilities - published interfacesMichael Hudson mwh at python.net
Mon Dec 22 14:56:32 EST 2003
"Terry Reedy" <tjreedy at udel.edu> writes:

> "Luke Kenneth Casson Leighton" <lkcl at lkcl.net>
> wrote in message
> news:20031220121942.GF1933 at lkcl.net...
>> if you "feed" access to __class__ via a single
> function, you have
>> a bottleneck again which can be replaced.
>>
>> so, the proposal is simple: create an
> __builtin__ function called
>> __get_class__ through which access to __class__
> is made.
>>
>
> I wonder if it would not be better to turn
> __class__ into a property with a get function that
> conditionally gives out the real thing.

As much as it makes sense to say it, __class__ is a property -- really
a getset descriptor, but that's just because it's in C.

It would be a imple matter to add a call to PyEval_GetRestricted in
object_get_class (not sure whether this is wise or helpful -- only
been skimming this thread -- but it certainly ain't hard).

Cheers,
mwh

-- 
  I don't remember any dirty green trousers.
                                             -- Ian Jackson, ucam.chat

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4