Michael Chermside wrote: >> How about we change unicode-vs-str __eq__ to >> issue a warning (and return False) instead of raising >> UnicodeException? > [... Marc-Andre Lemburg agrees ...] >> Great! Now we need someone to volunteer to write a patch (which should >> include doc and NEWS updates) in time for beta 3 (Aug 18). > > I don't *strongly* object to this consensus, but if you haven't > glanced at my original example, take a look - it might convince you. > The proposed solution will not help with my example. I'm not sure the > motivation for breaking code like that example -- the bug-hunting > motivation is satisfied by issuing a warning as Michael Urman proposes, > then use an exception after one more release when people have had time > to fix their code.
The warning framework gives programmers great flexibility in handling these situation: * they can silence the warning, just report it once, always report it * they can have the warning raise an exception * they can log the warning in some way It's very flexible to accommodate for all kinds of ways to handle the situation. By introducing a new category of warning for these Unicode-related warnings, adding specific warning filters will be easy. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 10 2006) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ ::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! :::: _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com