[Python-Dev] Re: @deprecated

Michael Hudson mwh at python.net
Wed Mar 9 10:16:28 CET 2005


Greg Ward <gward at python.net> writes:

> On 08 March 2005, Michael Chermside said:
>> Greg writes:
>> > This is one of my top two Java features [1].
>>           ...
>> > [1] The other is compiler recognition of "@deprecated" in doc comments.
>> 
>> Hmm... what a good idea! Let's see... what exactly does "@deprecated" DO in
>> Java? Why it causes the compiler to emit a warning if you use the function in
>> question. Not a bad idea.
>
> Isn't it, though?
>
>> Amusingly enough, the syntax is even the same in
>> Python:
> [...code omitted...]
>
> Cooool.  So simple, and yet so powerful.  One might even call it Pythonic!

One difference: I imagine (hope!) the java compiler would complain if
the deprecated function is referenced, whereas the python version only
complains if it is called...

Cheers,
mwh

-- 
  ROOSTA:  Ever since you arrived on this planet last night you've
           been going round telling people that you're Zaphod
           Beeblebrox, but that they're not to tell anyone else.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 7


More information about the Python-Dev mailing list