homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 'cast' any value to a Boolean?
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: docs@python, eli.bendersky, ezio.melotti, mark.dickinson, meador.inge, python-dev
Priority: normal Keywords:

Created on 2011年11月28日 14:01 by mark.dickinson, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (6)
msg148480 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2011年11月28日 14:01
Docs nit: at http://docs.python.org/dev/library/stdtypes.html#boolean-values we have
"""
The built-in function bool() can be used to cast any value to a Boolean ...
"""
It's a little unusual to talk about casting in Python. Any objections to replacing 'cast' with 'convert'?
msg148481 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011年11月28日 14:02
+1
msg148489 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2011年11月28日 15:32
+1
msg148537 - (view) Author: Eli Bendersky (eli.bendersky) * (Python committer) Date: 2011年11月29日 02:43
'bool' is just one of many conversion functions that convert their argument to the type they designate. Does this doc problem only exist for 'bool' or also for 'int', 'float' and others?
msg148767 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011年12月02日 17:49
New changeset 2f9c986b46cd by Ezio Melotti in branch '2.7':
#13494: s/cast/convert/. Also add a link.
http://hg.python.org/cpython/rev/2f9c986b46cd
New changeset 69369fd3514b by Ezio Melotti in branch '3.2':
#13494: s/cast/convert/. Also add a link.
http://hg.python.org/cpython/rev/69369fd3514b
New changeset 454b97887c5a by Ezio Melotti in branch 'default':
#13494: merge with 3.2.
http://hg.python.org/cpython/rev/454b97887c5a 
msg148768 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011年12月02日 17:50
Fixed!
@Eli
At least in the doc, I haven't seen any other suspicious use of 'cast'.
History
Date User Action Args
2022年04月11日 14:57:24adminsetgithub: 57703
2011年12月02日 17:50:39ezio.melottisetstatus: open -> closed
messages: + msg148768

assignee: docs@python -> ezio.melotti
resolution: fixed
stage: needs patch -> resolved
2011年12月02日 17:49:13python-devsetnosy: + python-dev
messages: + msg148767
2011年11月29日 02:43:47eli.benderskysetnosy: + eli.bendersky
messages: + msg148537
2011年11月28日 15:32:26meador.ingesetnosy: + meador.inge
messages: + msg148489
2011年11月28日 14:02:16ezio.melottisetnosy: + ezio.melotti

messages: + msg148481
stage: needs patch
2011年11月28日 14:01:08mark.dickinsoncreate

AltStyle によって変換されたページ (->オリジナル) /