• (nodebb)

    The word does not mean what they think it does!!! Deprecated = "express disapproval of", "usable but regarded as obsolete and best avoided, typically due to having been superseded".....

    Commenting out (or deleting code) is not deprecation. Deprecated code is fully functional (defined at least as functional as it was before being declared deprecated).

  • doubting_poster (unregistered)

    Lots of explanation for something that the story concludes isn't a WTF, but the WTF is a relatively minor misuse of a term in a comment? Meh.

    Although the author Richard sounds like an annoying guy, that's purely subjective and we don't know anything about the poster Guy. Fail article.

  • siciac (unregistered)

    The other key sign is that Richard has taken an… unusual approach to object-oriented programming.

    No, TRWTF is creating a class for this. The pythonic answer is to pass in the function.

  • Warren (unregistered) in reply to doubting_poster

    I realise you're probably a troll but I'm with Guy. Richard is clearly the sort of know-it-all that permanently generates WTF material.

    If you think Remy's seriously saying the error isn't a WTF, you have missed the point - or are you attempting to use irony yourself? Either way ... Fail comment.

  • Chronomium (unregistered)

    "Why is newly written code already marked as @DEPRECATED?" I've seen this used (in other languages) just to trigger a compile/environment warning so other people don't try and use it so readily.

    It's abuse of feature, and doesn't cover this case where it's also commented out. But there it is.

  • Raj (unregistered) in reply to Warren

    Maybe Richard is the kind of guy who creates WTF but this is at best a minor one that doesn't warrant the useless background story. We get it, he's a jerk, and poor Guy feels unappreciated, but that's something for Danielle Steel novels not for a tech forum.

    Fail reply.

  • Cidolfas (unregistered)

    I've actually used a pattern somewhat similar to that to approximate enumerations, where we want to use numbers to be the values we save but we want to refer to those values in ways that aren't magic numbers. The numbers represent key values, not key indices, so it makes sense not to treat it as an array (e.g. what if we want to remove enum value 2?) No idea if Python has the concept of enums and some of the surrounding code is probably not ideal, but the idea of having a dictionary with constants as keys isn't that ridiculous.

  • COBRIEN (unregistered)

    The WTF of the WTF is that the code isn't even really marked as deprecated, the entire line is commented out so there is no real point of even having the line exist.

  • Zenith (unregistered)

    Guy is damned if he does and damned if he doesn't. He follows the weird in use style, Richard makes condescending comments. He goes his own way, Richard uses it as a club to bludgeon him with.

  • FormalWare (unregistered)

    Guy is the “framework [italicized] Guy”; Richard must then be the "CV, uh... Richard".

  • (nodebb)

    I suspect Richard's last name may be Cranium.

  • Norman Rasmussen (google)

    The real WTF is why the Enum library wasn't used !?!

  • (nodebb) in reply to Norman Rasmussen

    Enums in older Python code are pretty nasty. But so is making a dictionary every time just to throw it away after a single lookup.

  • smf (unregistered)

    The WTF of the WTF is that the code isn't even really marked as deprecated, the entire line is commented out so there is no real point of even having the line exist.

    By putting the commented out @deprecated in, it means it's not deprecated.

    You can then do a search of all the functions that aren't deprecated and when it is deprecated the diff will show the comment characters being removed.

    The real WTF is that is the only place they will have done it like that....

  • Adam Jorgensen (github) in reply to Norman Rasmussen

    I was about to post the same...

    Also, Norman Rasmussen...did you happen to go the UCT?

  • bobcat (unregistered) in reply to KattMan

    That one took me a moment. Heh.

Leave a comment on “Dictionary Definition”

Log In or post as a guest

Replying to comment #:

« Return to Article