On 07/20/2010 12:00 PM, Fred Drake wrote: > On Tue, Jul 20, 2010 at 12:47 PM, Ron Adam<rrr at ronadam.com> wrote: >> It doesn't fall under the single constant rule if done this way. > > If the value for 'allow' were almost always given as a constant, this > would be an argument for three functions instead of one. > > The guideline has little to do with the type of the value, but the > number of possible values ("small") and whether they're normally given > as constants in the code. > > If there's more than one, and combinations then to vary, then keeping > them as args makes sense. > > Also, if we don't know what we want the functionality to be, as you > suggest, then worry about that is premature. :-) Let's decide on the > required functionality first. That makes sense. :-) Another things that comes to mind, is it may make sense to choose either strict, and have args to *allow* different cases, or to choose lenient, and have args to *restrict* different cases. That keeps it somewhat less confusing, and doesn't require memorization to remember what the mixed mode default might be. (Unless we use a single combination 99% of the time, then that probably *should* be the default.) Ron
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4