Imaginative solutions to connect. Was: Python 1.6 alpha 1 released

Daniel Berlin+list.python dan at cgsoftware.com
Thu Apr 6 00:20:21 EDT 2000


>>>>> "James" == James Logajan <JamesL at Lugoj.Com> writes:


    James> Guido van Rossum wrote:
    >>  Repeat after me: SOCKETS ARE NOT JUST FOR IP CONNECTIONS.
    >> 
    >> But I will fix the code -- it's the only practical thing to do.


    James> For alternatives 2 and 3 you need some incentive for people
    James> to change; cash might work but could get expensive. Rigging
    James> keyboards to deliver electrical shocks might work but might
    James> be too time consuming. Making the old interface much slower
    James> might help. Perhaps someone can think of a good
    James> incentive...  (get some new and improved methods only if
    James> you use the new class, or something?)  --

Why don't we introduce an official deprecation mechanism so that
python will say "Warning, connect(arg1,arg2) is deprecated, use
connect(arg1) instead" the first time it sees it or something.
Simple lookup table for what's deprecated, and what to say about it.
So code doesn't just break with no programmer visible warning from the
interpreter.
Hey, we could be really evil, and store the number of times we've
warned you, and have the interpreter get more and more annoyed at the
user, finally just refusing to interpret the code at all.
Then again, i'm for the electrical shocks.

--Dan




More information about the Python-list mailing list