Alan Gauld schreef op 2015-04-30 00:51: > ...
Trying to visually scan for _ or even __ is hard. Also different fonts make _ and __ hard to distinguish.
> ...
But they will be. Almost for certain. It's human nature and the nature of code maintenance. If it's there somebody will find a use for it. The fact that 5 or 10 years earlier the author didn't intend for it to be used is immaterial.
Summarizing a bit, I think you make two main points (please correct me if I'm wrong):
[1] Visually scanning for _ or __ is hard, and _ are __ hard to distinguish from each other.
Personally, I find it easy to scan for them, but I think I can see whee you're coming from. Python tends to prefer words and tends to dislike symbols compared to e.g. C, C++, and certainly Perl. One could argue that using _ or __ goes against that, though to me it's not a problem. We're still very far from Perl's line noise. It's true that _ and __ can be difficult to be distinguished from each other, but that's also not a problem to me, since I don't care about their values.
[2] Inevitably, sooner or later someone somewhere will start using _ or __ despite the fact that by convention they should not be used.
I have to admit that I have no experience programming in larger teams, and was blissfully unaware of the problems you describe. I think I can see how it might be better to avoid __ rather than try to enforce good coding discipline.
I still feel __ to be valuable, but I can see now where your dislike for it is coming from. Thank you for your insights!
Best regards, Roel -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac Asimov Roel Schroeven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor