Re: [Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Rafael Knuth
> A good thing to do but in some cases you have > to settle for "that's just the way Guido made it" :-) Thanks for the elaborate answer. That helps me a lot, as I see some similarities to natural languages: There is a clearly defined structure, but in some cases purely arbitrary decisions have be

Re: [Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Alan Gauld via Tutor
On 15/08/18 08:32, Rafael Knuth wrote: > I am trying to wrap my head around naming conventions & semantics in Python. A good question with a none to simple answer. In truth some of it goes back to essentially arbitrary decisions made by Guido vanRossum when he originally designed Python! The othe

Re: [Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Ben Finney
Rafael Knuth writes: > - List is a function, and read is a method, is that correct? * No, ‘list’ is a type. Types are callable; they return an instance of the type. * Yes, a file object has a ‘read’ method. * Every method is a function. Not every function is a method. > - Semantic wise it w

[Tutor] understanding Python naming conventions & semantics

2018-08-15 Thread Rafael Knuth
I am trying to wrap my head around naming conventions & semantics in Python. Here are two code snippets, and below those two snippets are my questions: # code snippet 1 file_path = "C:\\Users\\...etl.csv" with open(file_path) as file_object: contents = file_object.read() contents_split = conte