Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rephrasing the doc of object.__nonzero__ #49743

Closed
ezio-melotti opened this issue Mar 15, 2009 · 2 comments
Closed

Rephrasing the doc of object.__nonzero__ #49743

ezio-melotti opened this issue Mar 15, 2009 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir

Comments

@ezio-melotti
Copy link
Member

BPO 5493
Nosy @birkenfeld, @ezio-melotti

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2009-03-15.21:45:03.609>
created_at = <Date 2009-03-15.13:21:22.952>
labels = ['docs']
title = 'Rephrasing the doc of object.__nonzero__'
updated_at = <Date 2009-03-15.21:45:03.608>
user = 'https://github.com/ezio-melotti'

bugs.python.org fields:

activity = <Date 2009-03-15.21:45:03.608>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2009-03-15.21:45:03.609>
closer = 'georg.brandl'
components = ['Documentation']
creation = <Date 2009-03-15.13:21:22.952>
creator = 'ezio.melotti'
dependencies = []
files = []
hgrepos = []
issue_num = 5493
keywords = []
message_count = 2.0
messages = ['83630', '83642']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'ezio.melotti']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue5493'
versions = []

@ezio-melotti
Copy link
Member Author

The doc 1 actually says:
object.__nonzero__(self)
Called to implement truth value testing, and the built-in operation
bool(); should return False or True, or their integer equivalents 0 or

  1. When this method is not defined, __len__() is called, if it is
    defined (see below). If a class defines neither __len__() nor
    __nonzero__(), all its instances are considered true.

I suggest to:

  1. drop the comma after 'testing';
  2. clarify what happens when __nonzero__ is defined and where 'below'
    actually is (and possibly add a link).

@ezio-melotti ezio-melotti added the docs Documentation in the Doc dir label Mar 15, 2009
@birkenfeld
Copy link
Member

Thanks, fixed in r70387.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

2 participants