Em Sáb, 2006-02-18 às 14:38 +0200, Max escreveu: > On monday I start a semester course in Python (the alternative was > Java). I was looking through the course outline and noticed the following: > > 1) UserDict is used. This is deprecated, right?
LOL... it's the first time I see someone talking about this module. /me checks the documentation. Yep, looks like this module is deprecated since Python 2.2. > 2) There is no mention of list comprehensions, but map and filter are > taught early and then revisited later. I don't think this is good: list > comprehensions are, IMO, one of Python's great features, Psyco prefers > them, they're more pythonic, and map and filter seem to be going out the > window for Python 3000. Urgh. This sucks. Did they mention generators, at least? Sometimes list comprehensions are even faster (I didn't check, but I think this one can be an example of this: [i*2+2 for i in iterator] vs. map(lambda x: x*2 +2, iterator)). They should have taught both. > What do you think? I wonder if they need some updating. > --Max Just my two cents, Felipe. -- "Quem excele em empregar a força militar subjulga os exércitos dos outros povos sem travar batalha, toma cidades fortificadas dos outros povos sem as atacar e destrói os estados dos outros povos sem lutas prolongadas. Deve lutar sob o Céu com o propósito primordial da 'preservação'. Desse modo suas armas não se embotarão, e os ganhos poderão ser preservados. Essa é a estratégia para planejar ofensivas." -- Sun Tzu, em "A arte da guerra" -- http://mail.python.org/mailman/listinfo/python-list