Why not 3.__class__ ?

brueckd at tbye.com brueckd at tbye.com
Tue Oct 9 14:21:21 EDT 2001


On Tue, 9 Oct 2001, Markus Jais wrote:

> In article <cpvghoj4yu.fsf at cj20424-a.reston1.va.home.com>, "Guido van
> Rossum" <guido at python.org> wrote:
>
> > Marcin, I don't understand why you care so much about being able to
> > write 3.foo.  It's painful to fix in the lexer, and probably leads to
> > less useful error messages if someone makes a mistake in a float literal
> > (e.g. "3.e 0").  And I see zero use for it: in practice, you will never
> > ask for 3.foo -- you'll ask for x.foo where x happens to contain the
> > value 3.

[snip]
> but to write 3.foo is something I would like to have in Python
[snip]
> It would be great, if this would be possible in Python too

Care to elaborate on why it would be "great"? Guido's reply to Marcin
points out that there doesn't seem to be any usefulness to it. So.... what
problem would it solve or simplifiy?  What exactly would its benefit be,
anyway?





More information about the Python-list mailing list