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/2006-January/060124.html below:

[Python-Dev] Path inherits from string

[Python-Dev] Path inherits from string [Python-Dev] Path inherits from string"Martin v. Löwis" martin at v.loewis.de
Thu Jan 26 19:54:03 CET 2006
M.-A. Lemburg wrote:
> Please note that inheritance from string will cause the C type
> checks of the form PyString_Check(obj) to return true.
> C code will then assume that it has an object which is
> compatible to string C API which instances aren't.

Oh, sure they are. Types inheriting from str have the same
layout as str, and C code assuming that layout will work fine
with them. Inheritance works (saying "inheritance *just* works
would deny the many fine details that have been engineered to
actually make it work").

Regards,
Martin
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