4 ms·
I kind of agree with garnaat's reply, if they just suddenly change the default from TRUE to FALSE they're going to break backwards compatibility with anyone usi
by UnoriginalGuy 13y ago
I kind of agree with garnaat's reply, if they just suddenly change the default from TRUE to FALSE they're going to break backwards compatibility with anyone using the library and worse still in a really subtle way!
All they can really do at this stage is add a warning to the documentation and hope that new people using the library figure out the significance.
- jahewson 13y agoThis is what major version numbers are for.
- jey 13y agoOr issue an actual runtime warning: http://docs.python.org/2/library/warnings.html http://docs.python.org/2/library/warnings.html
- Negitivefrags 13y agoThat's why you should avoid using default arguments in library functions.
- jhenkens 13y agoGreat point! I have never heard that, but it makes perfect sense. Hopefully I will remember in the future.
- reconbot 13y agoI don't agree, you should just know what they are. Defaults are helpful.
- tnorthcutt 13y agoUntil they change, and your code breaks, and you have to go figure out why. The point of not (silently) using defaults is that as long as you're explicit with your arguments, you won't get surprised by changing defaults. Of course, you might get surprised by any number of other changes, but you can at least reduce your failure surface area a little bit :-)
- deleted 13y ago[deleted]