[Python-Dev] Re: @deprecated (original) (raw)
Michael Hudson mwh at python.net
Wed Mar 9 10:16:28 CET 2005
- Previous message: @deprecated (was Re: [Python-Dev] Re: Useful thread project for 2.5?)
- Next message: [Python-Dev] Re: @deprecated
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: @deprecated (was Re: [Python-Dev] Re: Useful thread project for 2.5?)
- Next message: [Python-Dev] Re: @deprecated
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]