Everything good about Python except GUI IDE?
ben+python at benfinney.id.au
Sun Feb 28 20:05:32 EST 2016
Steven D'Aprano <steve at pearwood.info> writes:
> Changing line endings is neither a structural nor a semantic change to
> the content of the file. It's effectively metadata, not data.
Hmm. Unlike other examples you give (like filesystem permissions on the
file) the line endings *are* content in the file. You may say they're
metadata, and maybe there's a case for that; I think that doesn't stop
line endings in the file from being content — and changes to those are
changes to content.
I'd say “what line ending style is in use” is closer to the information
about text encoding. Yes, it is metadata; it is *also* content, because
a change to the text encoding must be reflected as a change to the
file's content. The same is not true for (e.g.) filesystem permissions.
I would say that a change to the text encoding in the file should be
reflected as a change to the file content, and presented as such by the
VCS. Do you agree?
Whatever your answer to that, I would be interested to know whether you
think the answer should be different for line ending changes.
> Who is the boss here? The user of the tool, or the tool?
We are unfortunately a slave to decisions made long in the past, to
record some metadata – line endings, text encoding – as in-band content
rather than out-of-band pure metadata. The VCS must, IMO, be at least
aware that the content has changed when those in-band data change.
\ “Visitors are expected to complain at the office between the |
`\ hours of 9 and 11 a.m. daily.” —hotel, Athens |
More information about the Python-list