On Thu, Jun 24, 2010 at 1:12 AM, Stephen J. Turnbull <stephen at xemacs.org> wrote: > Guido van Rossum writes: > > > For example: how we can make the suite of functions used for URL > > processing more polymorphic, so that each developer can choose for > > herself how URLs need to be treated in her application. > > While you have come down on the side of polymorphism (as opposed to > separate functions), I'm a little nervous about it. Specifically, > Philip Eby expressed a desire for earlier type errors, while > polymorphism seems to ensure that you'll need to Look Before You Leap > to get early error detection. Understood, but both the majority of str/bytes methods and several existing APIs (e.g. many in the os module, like os.listdir()) do it this way. Also, IMO a polymorphic function should *not* accept *mixed* bytes/text input -- join('x', b'y') should be rejected. But join('x', 'y') -> 'x/y' and join(b'x', b'y') -> b'x/y' make sense to me. So, actually, I *don't* understand what you mean by needing LBYL. -- --Guido van Rossum (python.org/~guido)
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