GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing mail.python.org — [Python-Dev] Death to string functions! [Python-Dev] Death to string functions!Peter Funk [email protected]Sun, 17 Dec 2000 18:40:06 +0100 (MET)
[string.function(S, ...) vs. S.method(...)] Guido van Rossum: > I don't believe one bit of this. By that standard, we would do better > to define a new module "list" and start writing list.append(L, x) for > L.append(x). list objects have only very few methods. Strings have so many methods. Some of them have names, that clash easily with the method names of other kind of objects. Since there are no type declarations in Python, looking at the code in isolation and seeing a line i = string.index(some_parameter) tells at the first glance, that some_parameter should be a string object even if the doc string of this function is too terse. However in i = some_parameter.index() it could be a list, a database or whatever. > You are entitled to your opinion, but given that your arguments seem > very weak I will continue to ignore it (except to argue with you :-). I see. But given the time frame that the string module wouldn't go away any time soon, I guess I have a lot of time to either think about some stronger arguments or to get finally accustomed to that new style of coding. But since we have to keep compatibility with Python 1.5.2 for at least the next two years chances for the latter are bad. Regards and have a nice vacation, Peter
|
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |