Message220687
[R David Murray]
>I don't think that's true, though. "file like" pretty much means
> "has the file attributes that I actually use".
> That is, it is context dependent (duck typing).
That is pretty much on-target.
Also, the phrase "file-like" has been used very loosely from Python's inception. Laying down a "mandatory" specification doesn't match the reality of how the phrase is used or the way our code has been written.
> Maybe I'm missing some important point here
Yes, I think you are. That is evident in this and your other tracker items whose theme is "there must be precisely documented rules for everything, all expectations, norms, cultural conventions, patterns must be written down, made precise, and enforced, etc".
Before creating more tracker items, please take time to learn about how Python's history, how it is used, and its cultural norms. In particular, read the Zen of Python, consider what is meant by duck-typing, what is meant by "a consenting adults language", what is meant by over-specification, etc. Python is quite different from Java in this regard.
In a quest for "tell me exactly what I have to do", I think you're starting to make-up new rules that don't reflect the underlying reality of
the actual code or its intended requirements.
I recommend this tracker item be closed for the reasons listed by Nick Coghlan and David Murray. I think the proposed patch doesn't make the docs better, and that it seeks to create new made-up rules rather than documenting the world as it actually exists.
Side-note: The place to talk about what "file-like" means is the glossary. The ABC for files and the term "file-like" are related but are not equal. |
|
Date |
User |
Action |
Args |
2014-06-16 01:26:34 | rhettinger | set | recipients:
+ rhettinger, georg.brandl, ncoghlan, pitrou, benjamin.peterson, stutzbach, ezio.melotti, eric.araujo, r.david.murray, nikratio, docs@python, hynek |
2014-06-16 01:26:33 | rhettinger | set | messageid: <1402881993.93.0.517500736786.issue21763@psf.upfronthosting.co.za> |
2014-06-16 01:26:33 | rhettinger | link | issue21763 messages |
2014-06-16 01:26:31 | rhettinger | create | |
|