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/2001-August/016806.html below:

[Python-Dev] "not an acceptable base type"?

[Python-Dev] "not an acceptable base type"? [Python-Dev] "not an acceptable base type"?Guido van Rossum guido@python.org
Wed, 08 Aug 2001 19:40:03 -0400
> Is there something tricky about subclassing strings (and ints, floats,
> ...)?  I've considered spending some time trying to make other types
> subclassable.  If each python-dev'er takes one it shouldn't take too
> long. :-)

The tricky thing is that you have to do most of the initialization in
tp_new (not tp_init), and yet you must allow a subclass to override
tp_alloc and tp_free.  Immutable types and types with their own free
list or caching definitely are trickier than the ones I did so far...

--Guido van Rossum (home page: http://www.python.org/~guido/)



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