A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-May/024250.html below:

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib types.py,1.26,1.27

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib types.py,1.26,1.27Guido van Rossum guido@python.org
Wed, 22 May 2002 11:06:05 -0400
>     skip> add BooleanType
> 
>     mwh> I thought we weren't doing this anymore...?
> 
>     Guido> On the other hand for existing code that imports a bunch of types
>     Guido> from types.py it may be more consistent to use BooleanType.
> 
> You find this in a lot of code:
> 
>     from types import *
> 
> Given that every other type is exposed through the types module it
> just seems kind of odd to force people to use isinstance() for
> bools, but have the old way of doing things continue to work for
> every other type.  I think you can stop adding new types to the
> types module if and when you deprecate it, but not before.

I don't see where I'm forcing people to use isinstance().  BooleanType
is exactly the same object as bool -- you can use 'type(x) is bool' or
'isinstance(x, BooleanType)' if you want to.

I think the plan is to stop recommending the types module -- maybe
deprecating it too.

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





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4