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.

Title: 'cast' any value to a Boolean?
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
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 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
msg148489 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2011-11-28 15:32
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.

New changeset 69369fd3514b by Ezio Melotti in branch '3.2':
#13494: s/cast/convert/.  Also add a link.

New changeset 454b97887c5a by Ezio Melotti in branch 'default':
#13494: merge with 3.2.
msg148768 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2011-12-02 17:50

At least in the doc, I haven't seen any other suspicious use of 'cast'.
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