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-April/022320.html below:

[Python-Dev] ACCEPTED: PEP 285

[Python-Dev] ACCEPTED: PEP 285 [Python-Dev] ACCEPTED: PEP 285Martin v. Loewis martin@v.loewis.de
04 Apr 2002 20:47:07 +0200
Neal Norwitz <neal@metaslash.com> writes:

> 	def test(a):
> 	    if a is True: print 'True'
> 	    if a == False: print 'False'
> 
> generates these warnings:
> 	test.py:2: Should not assign to True, it is (or will be) a builtin
> 	test.py:3: Should not assign to False, it is (or will be) a builtin

While Gustavo suggests to let pass 'a is True', I recommend to give a
warning for this - people who want to see whether something is True
should write 'True is a'.

Regards,
Martin





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