[issue21014] `1` = `True`; for tutorial docs

2014-03-28 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Raymond, what I think you meant is that in 2.x, 'True' is a builtin name that 
can be shadowed by a user assignment True = 'not true' whereas in 3.x it is a 
keyword name like None that cannot be changed (None = 'some' fails even in 
2.7).

I checked and the patch is needed in 3.4 and (I presume) 3.5.

--
nosy: +terry.reedy
versions: +Python 3.4, Python 3.5 -Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21014
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21014] `1` = `True`; for tutorial docs

2014-03-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset deb71529aad1 by Raymond Hettinger in branch '3.4':
Issue 21014:  Use booleans instead of 0 and 1 in examples.
http://hg.python.org/cpython/rev/deb71529aad1

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21014
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21014] `1` = `True`; for tutorial docs

2014-03-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Samuel, thanks for the patch.   And, Terry, thanks for looking at it.

Applied the first two changes to 3.4 and 3.5.  Skipped, the third suggested 
change in introduction.rst.  That was not a boolean example, it was just the 
number 1 in a section about how comments work, so it shouldn't change.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21014
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21014] `1` = `True`; for tutorial docs

2014-03-23 Thread Raymond Hettinger

Raymond Hettinger added the comment:

In Python 2.7, we're not changing all the 1 to True because that aren't 
quite the same (True is a global and not a builtin constant).

If you see these in 3.x, we should change them all :-)

--
assignee: docs@python - rhettinger
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21014
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21014] `1` = `True`; for tutorial docs

2014-03-22 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +ezio.melotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21014
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21014] `1` = `True`; for tutorial docs

2014-03-21 Thread Samuel Marks

New submission from Samuel Marks:

Particularly for new programmers `True` makes more sense than `1` when doing 
boolean logic.

If you aren't going to accept this patch; at least add in a sentence explaining 
that: ` 1 == True`.

Best,

Samuel Marks

--
assignee: docs@python
components: Documentation
files: Use_`True`_instead_of_`1`_.patch
hgrepos: 229
keywords: patch
messages: 214430
nosy: SamuelMarks, docs@python
priority: normal
severity: normal
status: open
title: `1` = `True`; for tutorial docs
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file34559/Use_`True`_instead_of_`1`_.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21014
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com