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

2009-02-23 Thread Eric Smith

Eric Smith e...@trueblade.com 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 rep...@bugs.python.org
http://bugs.python.org/issue5348
___
___
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 ge...@python.org 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 rep...@bugs.python.org
http://bugs.python.org/issue5348
___
___
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 Mitchell Model

Mitchell Model m...@acm.org 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 rep...@bugs.python.org
http://bugs.python.org/issue5348
___!doctype html public -//W3C//DTD W3 HTML//EN
htmlheadstyle type=text/css!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --/styletitleRe: [issue5348] Documentation of format implies
only strin/title/headbody
divSorry -- I was too quick to include 2.6 and 2.7 in the bug
tracker entry.nbsp; 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./div
divtt-- /tt/div

div-- br
br
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; --- Mitchell/div
/body
/html___
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 m...@acm.org:

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 rep...@bugs.python.org
http://bugs.python.org/issue5348
___
___
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 benja...@python.org:


--
nosy: +eric.smith

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