[Python-3000] gettype

Guido van Rossum guido at python.org
Fri Jul 7 22:09:51 CEST 2006


Hm... I'd rather not break my head over this right now. I've got a
feeling that we have bigger fish to fry, and I'd like to focus on
important things first. I'm also not convinced this is all that
broken.

--Guido

On 7/6/06, tomer filiba <tomerfiliba at gmail.com> wrote:
> as you may remember, i suggest some time ago to distinguish
> between the *function* type that returns the type of an object,
> and *metaclass* type that creates new types. the main issue
> was type() behaving both as a function and as a factory, which
> is an overloaded behavior.
>
> if i recall correctly, the general spirit was pro-disambiguation, and
> the argument turned around the semantics of the change.
> i suggested calling the function "typeof", and keeping the
> metaclass in tact, but GvR didn't like the "%sof()" notation, as
> it's quite unprecidented in the language.
>
> so why not choose the "get%s()" notation? we already have
> getattr, and other __get%s__ special methods, so gettype()
> would perfectly fit into this convention. it also feels more
> natural imo:
>
> >>> type("blah", (), {})
> <class '__main__.blah'>
>
> >>> gettype(5)
> <type 'int'>
>
> link to the old discussion (including the full details for the
> suggested change):
> http://mail.python.org/pipermail/python-3000/2006-May/002224.html
>
> any more comments? a pronouncement maybe?
>
>
> -tomer
> _______________________________________________
> Python-3000 mailing list
> Python-3000 at python.org
> http://mail.python.org/mailman/listinfo/python-3000
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-3000 mailing list