Live data from Hacker News

Intermediate Python

book.pythontips.com

51–60 of 81 posts

Re: Intermediate Python

#51
post #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

I've been thinking of something like this for models especially. Where I have made my own models and worked with Flask, but now need to integrate the Django framework. Just a vague idea though. Haven't formed a clear picture of how I'll do it at all

Re: Intermediate Python

#52
post #40
post #5

Hi guys! I am the author of this book. Thanks heyalexej for posting this here. If there is anything I can help you guys with then kindly let me know. :)

Just read the entire thing, good stuff! Interesting to see what's considered intermediate vs. basic and advanced. Feedback: maybe add a feedback section to the site? Haha. Dissect is spelled with 2 S's, and there's a broken link at the end of the virtualenv section. Thanks for your work! Learned a few things for sure.

ditto that, I just read the whole thing! I knew some of those tricks and others were new. Thanks!

Re: Intermediate Python

#54
post #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

I love his work and I honestly recommend it to you guys! :)

Re: Intermediate Python

#55
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

Whilst I don't buy into the TDD fad, Testing should not be an advanced topic.

Re: Intermediate Python

#56
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 usually search in code in github for IRL-examples. Sometimes it works just as good.

Re: Intermediate Python

#57
I love it, as a biologist I did a Python course some months ago, already I'm much more productive than I was in my Origin/Excel time. this books really clarifies many of those strange things (like kwargs etc). This is going straight into my favorites and I know I'll be using it often. Thanx!!!

Re: Intermediate Python

#58

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

That's a bummer, actually. "filter(thing, None)" is far prettier than "[thing for thing in things if thing is not None]"

:(

Re: Intermediate Python

#59
post #57

I love it, as a biologist I did a Python course some months ago, already I'm much more productive than I was in my Origin/Excel time. this books really clarifies many of those strange things (like kwargs etc). This is going straight into my favorites and I know I'll be using it often. Thanx!!!

I love to read such comments. They help to fuel me. :)

Let me know how you use this book! And kindly share it with your peers. Best of luck!

Re: Intermediate Python

#60
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

Whilst I don't buy into the TDD fad, Testing should not be an advanced topic.

What don't you buy about TDD?
Post reply on HN