Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #82574
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Subject | Re: Portable code: __import__ demands different string types between 2 and 3 |
| Date | 2014-12-16 13:53 +1100 |
| References | <85wq5tpe0g.fsf@benfinney.id.au> <548F18FC.5040408@stoneleaf.us> <85iohcpe9n.fsf@benfinney.id.au> <548F8F9A.9040708@stoneleaf.us> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16994.1418698437.18130.python-list@python.org> (permalink) |
Ethan Furman <ethan@stoneleaf.us> writes: > On 12/15/2014 05:36 PM, Ben Finney wrote: > > I'm increasingly of the opinion this is a subtle bug in ‘__import__’ > > that should be fixed instead of worked around. And other people agree: <URL:https://bugs.python.org/issue21720>. > Of course. But you'll still need to work around it for previous > versions, unless you can say you only support 2.7.10+ (maybe 2.7.9+ if > it gets fixed quick enough). If I can eventually drop the kludge by dropping support for Python <2.7 at some future point (instead of waiting until I can drop Python <3), that would still be an improvement. > Functions that should accept str but barf on unicode have a tendency > to get fixed. I hope you're right. The bug report currently focusses on improving the error message only. -- \ “They who can give up essential liberty to obtain a little | `\ temporary safety, deserve neither liberty nor safety.” | _o__) —Benjamin Franklin, 1775-02-17 | Ben Finney
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Portable code: __import__ demands different string types between 2 and 3 Ben Finney <ben+python@benfinney.id.au> - 2014-12-16 13:53 +1100
csiph-web