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/2007-February/071320.html below:

[Python-Dev] A "record" type (was Re: Py2.6 ideas)

[Python-Dev] A "record" type (was Re: Py2.6 ideas) [Python-Dev] A "record" type (was Re: Py2.6 ideas)Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 21 23:41:07 CET 2007
Josiah Carlson wrote:

> Somewhere in the back of my mind something is telling me - if you can
> get a tuple with attributes based on __slots__, you just duplicate the
> references as both an attribute AND in the standard tuple PyObject*
> array,

It should be possible to start with a tuple subclass and
add descriptors to provide named access. If the descriptor
is implemented in C it should be just as efficient as
using __slots__, but with no duplication of the references.

Given a suitable descriptor type, it shouldn't be hard to
write a factory function to assemble such classes.

--
Greg
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