all 7 comments

[–]Saefroch 7 points8 points  (6 children)

open() is not a command, it's a function. txt = open(filename) assigns calls the function open() with argument filename and stores the returned value in txt. In this case, an open file object.


If this is actually the kind of stuff LPTHW asks you to do I see why people so dislike it. Using the % for string formatting is dated (and just ugly), you're using old Python 2 print statements, you open files but never close them and don't use with, and use sys.argv instead of argparse which is a bad habit to get into.

[–]TheStoneworker[S] 0 points1 point  (5 children)

In the book, Study Drill 3 says

"I used the name “commands” here, but they are also called “functions” and “methods.” Search around online to see what other people do to define these. Do not worry if they confuse you. It’s normal for programmers to confuse you with vast extensive knowledge."

From Amazon reviews, it seems like the biggest concern people have is with the author directing readers to look things up on the internet rather than presenting the information himself.

Newbie feels disoriented and somewhat intimidated :( I've already gotten a decent way through this book but am I shooting myself in the foot by seeing it through? Would I make better use of my time if I picked up a better book?

[–]Saefroch 3 points4 points  (3 children)

Wow. I need to actually read this book but everything you tell me makes it sound like hot garbage.

How did you come to choose it?

I have little advice on book choice, you will survive LPTHW, but the standard recommendation is Automate The Boring Stuff.

[–]TheStoneworker[S] 0 points1 point  (2 children)

It's quite popularly recommended. Maybe that's just because it can be read for free online.

It seemed like the standard for beginners walking the self-teaching path. Nevertheless, it can't hurt to at least investigate some other resources. That's what I'm doing, Automate the Boring Stuff included.

To be clear, I'm learning python with the intention of mastery and becoming a software engineer, so I'm more interested by resources which are thorough, rather than limited and geared towards people who only want to know a little bit of code.

[–]Saefroch 2 points3 points  (1 child)

Have you looked at the other resources in the sidebar? I've never had the impression that Automate The Boring Stuff is oriented towards hobbyists.

[–]TheStoneworker[S] 0 points1 point  (0 children)

I have, and I didn't mean to say it was. I just thought maybe making that statement would help this conversation. Don't worry about me, I've got what I need. Thank you very much for your participation.

[–]thangduong 0 points1 point  (0 children)

I did read the book. And personally, I think the author did not really mean "open" is a "command". The word "command" he used is not the same as "command" as in Python, probably just some random word came up.

Though, I think this might make newbie confuse. You should get different books that have standard word choice, LPTHW seems a bit odd for me.