[Python-Dev] s1 == (sf % (s1 / sf))? A bad idea?
Jeremy Hylton
jeremy@alum.mit.edu
Tue, 3 Apr 2001 21:39:28 -0400 (EDT)
>>>>> "SM" == Skip Montanaro <skip@pobox.com> writes:
Jeremy> I imagine something like this:
Jeremy> import fileinput import scanf
SM> ...
SM> Placing the functionality in a module is fine as well, but
SM> again, "scanf" only means something if you've programmed in C
SM> before. I suspect there are college students graduating from CS
SM> departments now who have used C++ but not C and wouldn't have
SM> the slightest idea what "scanf" means.
I don't care much about the name. scanf is fine with me ("scan with
format") but so is "scan" -- or "parrot."
I do care about it being based on a module rather than a builtin
operator or a string method. I see scanf-based scanning as roughly
equivalent to regular expressions, which live happily in a module.
If we're going to add a scan method to strings, I can imagine people
wanting "\d+".re_match() and "\d+".re_search() methods on strings,
too.
Jeremy