[issue31283] Inconsistent behaviours with explicit and implicit inheritance from object

Vedran Čačić report at bugs.python.org
Sat Aug 26 13:32:30 EDT 2017


Vedran Čačić added the comment:

Sorry, I fail to see the big difference. 

Let's take print as an example:

All non-keyword arguments are converted to strings like str() does and written to the stream, separated by sep and followed by end. Both sep and end must be strings; they can also be None, which means to use the default values. If no objects are given, print() will just write end. The file argument must be an object with a write(string) method; if it is not present or None, sys.stdout will be used.

Is the above so different than writing:

    print(*args, file=f, sep=s, end=e)

is equivalent to

    f.write(s.join(map(str, args))+e)

? In my head, no. It's just that sometimes we use Python, and sometimes English, to describe the semantics.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31283>
_______________________________________


More information about the Python-bugs-list mailing list