On 15/02/2010 23:53, Michael Foord wrote:
On 15/02/2010 23:51, Jeff Hardy wrote:
On Mon, Feb 15, 2010 at 4:41 PM, Dino Viehland<di...@microsoft.com> wrote:
We could make % on a Unicode literal do something special much like
we're doing for calls to unicode(...).  Alternately we could make %
try to invoke __unicode__ before __str__ - but that would sometimes
be wrong.  Probably not very often, it's hard to imagine someone
defining __unicode__ and expecting __str__ to be returned with
a significant difference.
Fixing up u"..." literals is probably the lowest impact change,
especially for a point release. You never know what crazy stuff people
might do.


Yeah - u'%s' % foo is basically equivalent to u'%s' % unicode(foo) anyway...
Of course if you had a *really* good type inferencer that you could use at compile time then you could infer a few places where names *must* be bound to unicode strings (trace unicode literals or the results of calls to unicode) and catch a few more places to fix up as well.

Possibly a bit out of scope though...

Michael


Michael

- Jeff
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of 
your employer, to release me from all obligations and waivers arising from any 
and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, 
clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and 
acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your 
employer, its partners, licensors, agents and assigns, in perpetuity, without 
prejudice to my ongoing rights and privileges. You further represent that you 
have the authority to release me from any BOGUS AGREEMENTS on behalf of your 
employer.


_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to