FEEDBACK WANTED: Type/class unification
Dylan Thurston
dpt at abel.math.harvard.edu
Mon Aug 6 12:23:45 EDT 2001
In article <cp66cd12yp.fsf at cj20424-a.reston1.va.home.com>, Guido van
Rossum wrote:
>When I released Python 2.2a1, the type/class unification feature was
>announced as TENTATIVE. It's been a while now (feels like a year,
>although I realize it's only been 10 days :), and I would like to see
>some feedback on this.
The larger picture seems a little complicated for me to understand
right now, but I have a specific complaint:
The 'list' class/type has a method '__getslice__' (etc.), which uses
the old and very broken interface. I want to define a subclass for
which this interface is insufficient. If I want the new interface, I
have to figure out how to hide that method. [Does anyone know how to
do this?]
Let me complain a little about the slicing interface while I'm at it.
I don't understand why missing endpoints are turned into 0/maxint
(rather than, say, 'None') before calling __getitem__; it removes a
lot of flexibility. Also, why are the slices restricted to being
integers? I can imagine, say, slicing a 2-dimensional array based on
the endpoints (like 'delete-rectangle', etc. in Emacs).
Best,
Dylan Thurston
More information about the Python-list
mailing list