2009/9/28 Joaquim Rocha <[email protected]>: > Andrea Grandi wrote: >> from HTMLParser import HTMLParser <--- package name in upper case... >> urllib2.Request(url, data) <---- method name in upper case... >> >> first they suggest name convention and then they're the first one not >> following them? This really sucks :) > >> Request is an object (a class), it is not a method :)
They can't just change the naming for the standard library, as this would (obviously) break old code. Most likely these libraries have been around longer than PEP-8 has ;) I feel a bit bad about this, too, but at least it has been fixed in Python 3000 (as the API break allows for such changes): http://docs.python.org/dev/3.0/whatsnew/3.0.html#library-changes In Python 3.x, the HTMLParser module has been renamed to html.parser: http://docs.python.org/dev/py3k/library/html.parser.html Thomas _______________________________________________ maemo-developers mailing list [email protected] https://lists.maemo.org/mailman/listinfo/maemo-developers
