Why not 3.__class__ ?

Michael Abbott michael at rcp.co.uk
Tue Oct 9 18:24:23 CEST 2001

Paul Rubin <phr-n2001d at nightsong.com> wrote in 
news:7x4rp8q1cy.fsf at ruckus.brouhaha.com:

> How about (3).foo?

I should have tried it before posting.  This (and 3 .foo) already works in 
Python 2.1 (complains "'int' object has no attribute 'foo'", of course), so 
I would have thought the entire discussion was pointless: nothing needs to 
be changed to get the desired behaviour!

More information about the Python-list mailing list