[issue33324] Bug in documentation 3.6: string-methods - str.center
New submission from Alfonso Chavez <alfonsochc@gmail.com>: Hi. In https://docs.python.org/3/library/stdtypes.html#string-methods says: str.center(width[, fillchar]) But, I tried in Windows 10 and Ubuntu Server:
var = 'Variable de prueba' str.center(50, var) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: descriptor 'center' requires a 'str' object but received a 'int'
Then, I tried this:
str.center(var, 50) ' Variable de prueba '
I think the documentation should read: str.center(fillchar[, width]) Version in Windows: Python 3.6.5 Version in Ubuntu Server: Python 3.5.2 ---------- assignee: docs@python components: Documentation messages: 315562 nosy: Alfonso Chavez, docs@python priority: normal severity: normal status: open title: Bug in documentation 3.6: string-methods - str.center type: enhancement versions: Python 3.6 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33324> _______________________________________
Change by Alfonso Chavez <alfonsochc@gmail.com>: ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue33324> _______________________________________
participants (1)
-
Alfonso Chavez