Live data from Hacker News

Intermediate Python

book.pythontips.com

41–50 of 81 posts

Re: Intermediate Python

#41
Nice, I've shared it in my social networks.

As for a supposed "Advanced Python" edition, it would be great to compile at least a list of topics that could be interesting. Some have been already mentioned in this thread, like:

  - Metaclasses
  - Packaging (for pypi)
I'd add:

  - Must-have libraries
  - Testing

Re: Intermediate Python

#43
post #36
post #33

Shit, what I need is "How to publish a package to PyPi in 3 easy steps." I go around and round with the Python Packaging Authority's documentation.

I learned from this: http://peterdowns.com/posts/first-time-with-pypi.html Not bad.

It's not bad unless you want to upload detached signatures. Then it's a frantic search to find the right incantation to make it work.

Re: Intermediate Python

#44
Brilliant. Every language should have a book like this. I'm already learning a lot of little details about features I've had some passing experience on. Only request I have (which I generally have for stuff like this), is for real life use cases. Example would be args and *kwargs being used in decorators. Where do you use it? What's a real life example of it being used? How does that compare to the in built decorator functionality of Python? Answering this type of question helps people understand the technique and theory in equal measures as opposed to more theory than technique.

Thanks again for this :).

Re: Intermediate Python

#45
post #44

Brilliant. Every language should have a book like this. I'm already learning a lot of little details about features I've had some passing experience on. Only request I have (which I generally have for stuff like this), is for real life use cases. Example would be args and *kwargs being used in decorators. Where do you use it? What's a real life example of it being used? How does that compare to the in built decorator…

I use decorators like that in Django where I want to reuse the same code to check something on the request object but the functions I am decorating expect keyword arguments

Re: Intermediate Python

#46
post #41

Nice, I've shared it in my social networks. As for a supposed "Advanced Python" edition, it would be great to compile at least a list of topics that could be interesting. Some have been already mentioned in this thread, like: - Metaclasses - Packaging (for pypi) I'd add: - Must-have libraries - Testing

There is "Expert Python Programming" (https://www.packtpub.com/application-development/expert-pyth...). Some of the material is dated, but I'm sure it would be a good place to start as far as gathering topics for further study.

Re: Intermediate Python

#48

Really good stuff in here, thanks for this. Are there any plans to follow this up with something along the lines of "Advanced Python"?

Just go read David Beazely's site for that. Seriously

http://www.dabeaz.com/blog.html

A few good ones for reference:

http://www.dabeaz.com/generators/

https://www.youtube.com/watch?v=fwzPF2JLoeU

Re: Intermediate Python

#49

Map and filter are looked down upon by some Python devs because they prefer list comprehensions. If you don't need the laziness (in Python 3 only), you probably shouldn't use them because some don't consider them idiomatic. See this for more information: http://stackoverflow.com/a/6407222/384700

Yeah, map and filter not really idiomatic; you're almost always better served by a list/generator comprehension. Even Guido has regrets about map/filter/reduce: http://legacy.python.org/doc/essays/ppt/regrets/PythonRegret....

Re: Intermediate Python

#50
post #41

Nice, I've shared it in my social networks. As for a supposed "Advanced Python" edition, it would be great to compile at least a list of topics that could be interesting. Some have been already mentioned in this thread, like: - Metaclasses - Packaging (for pypi) I'd add: - Must-have libraries - Testing

Asyncio, for sure.
Post reply on HN