[EMAIL PROTECTED] wrote:
> Sorry if this is a dumb question, but are there actually good reasons to 
> remove "types"?
> IMHO the types module helps keeping code readable. 
> For example
> "if type(obj) == FloatType"
> is just more readable than
> "if type(obj) == type(1.0)".
>   

if isinstance(obj, float)

or

if type(obj) is float

I often use FunctionType though.So long as it moves rather than vanishes...

Michael
http://www.manning.com/foord

> Luckily Python does not distinguish float and double like other languages 
>  - otherwise it wouldn't be clear for the average programmer if 1.0 is a
>  float or a double constant.
>
> Henning
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: 
> http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
>
>   

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to