News for hackers. Stuff that matters.
Re:Checklist for Python libraries APIs by _hardwaregeek on Saturday December 02, 2017 @03:10AM (#15830863)
Please please make your module name consistent with the package name. I don't want to install beautifulsoup4 only to import bs4. It's really really confusing.
Re:Checklist for Python libraries APIs by mitchellberry on Saturday December 02, 2017 @07:18AM (#15831582)
For a library that does such a good job of simplifying the complex, that design choice always perplexed me.

When you look at their example import code it makes even less sense. People who need shorter object names already do that, no need for it to be at the library level.

Re:Checklist for Python libraries APIs by crdoconnor on Saturday December 02, 2017 @10:17AM (#15832155)
I've made this mistake. I just thought that A) people wouldn't actually shorten the module name even though they could B) it wasn't that confusing having two different names for import/package name.

It was dumb. I won't do it again.

I think if you do it early on you are stuck though. If beautiful soup changes now they will break a ton of code.

Re:Checklist for Python libraries APIs by flaviojuvenal on Saturday December 02, 2017 @10:44AM (#15832313)
Thanks for the suggestion. Will add that to the checklist. Feel free to contribute too: https://github.com/vintasoftware/python-api-checklist