[issue5348] Documentation of format implies only strings and numbers are acceptable arguments

2009-02-23 Thread Mitchell Model

Mitchell Model  added the comment:

Sorry -- I was too quick to include 2.6 and 2.7 in the bug tracker 
entry.  I usually check 3 vs 2.6 but since format is in 2.6 I didn't 
check the 2.6 doc page to discover, as you did, that it wasn't 
documented.
-- 
-- 

 --- Mitchell

Added file: http://bugs.python.org/file13157/unnamed

___
Python tracker 

___
Re: [issue5348] Documentation of format implies
only strin
Sorry -- I was too quick to include 2.6 and 2.7 in the bug
tracker entry.  I usually check 3 vs 2.6 but since format is in
2.6 I didn't check the 2.6 doc page to discover, as you did, that it
wasn't documented.
-- 

-- 

    --- Mitchell

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



[issue5348] Documentation of format implies only strings and numbers are acceptable arguments

2009-02-23 Thread Georg Brandl

Georg Brandl  added the comment:

Fixed in r69895, r69896. (Added format() to the 2.x builtins doc in the
latter.)

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue5348] Documentation of format implies only strings and numbers are acceptable arguments

2009-02-23 Thread Eric Smith

Eric Smith  added the comment:

I looked and don't see where this error is. In fact, I don't see
format() mentioned at all on the 2.6.1 page for builtin functions
(http://docs.python.org/library/functions.html), which is a problem.

What page are you looking at?

___
Python tracker 

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



[issue5348] Documentation of format implies only strings and numbers are acceptable arguments

2009-02-22 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
nosy: +eric.smith

___
Python tracker 

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



[issue5348] Documentation of format implies only strings and numbers are acceptable arguments

2009-02-22 Thread Mitchell Model

New submission from Mitchell Model :

The documentation of format on the builtin functions page should be 
changed from "Convert a string or a number" to "Convert a value".

The documentation begins "Convert a string or a number". This is 
misleading in that format can be called on any value, since there is an 
Object.__format__ and classes can define their own __format__ method. 
PEP 3101 is explicit about all of this and the documentation of 
__format__ ends by noting that "format(value, format_spec) merely calls 
value.__format__(format_spec)". typeobject.c implements 
Object.__format__ with a note about PEP 3101.

Given all of that I don't see why format should be explained as taking a 
string or a number as its first argument.

--
assignee: georg.brandl
components: Documentation
messages: 82616
nosy: MLModel, georg.brandl
severity: normal
status: open
title: Documentation of format implies only strings and numbers are acceptable 
arguments
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1

___
Python tracker 

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