GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] Problems with the new super()
  • [Python-Dev] Problems with the new super()
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] Problems with the new super()

[Python-Dev] Problems with the new super()

Andrew McNabb amcnabb at mcnabbs.org
Fri May 2 00:33:54 CEST 2008

  • Previous message: [Python-Dev] Problems with the new super()
  • Next message: [Python-Dev] Problems with the new super()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

On Thu, May 01, 2008 at 12:55:22PM -0700, Guido van Rossum wrote:
> 
> I'm not proud of this, but I don't see a way around it. The
> alternative would be to make it a keyword, which seemed excessive
> (plus, it would be odd if super() were a keyword when self is not).
> There were long discussions about various possible ways to implement
> something like this, and they all had their downsides. (The PEP still
> isn't fixed to describe the status quo.)

I remember some brainstorms about treating more like self.  I'm not sure
if these were thought through all the way, but I remember seeing
something like:

class MyClass(Super1, Super2):
    # This method requires super:
    @requires_super
    def __init__(self, super, **kwds):
        super(**kwds)

    # This method doesn't require super:
    def some_method(self):
        pass

I'm sure there are drawbacks, but it fits in my head.  Using super in
Python 2.0 is verbose but simple.  However, I'm a little scared of super
in Python 3.0.  I guess I'm probably just a wimp.


-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/python-dev/attachments/20080501/32c89f13/attachment.pgp>

  • Previous message: [Python-Dev] Problems with the new super()
  • Next message: [Python-Dev] Problems with the new super()
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

More information about the Python-Dev mailing list
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.