Feb-07-2020, 10:03 AM
Succinct and easy to follow is not enough. Information provided must be correct as well. Therefore my feedback not very positive. It's good to put effort into writing tutorial but result is not ready for distribution.
I randomly opened one chapter (Lists) and read:
Hmm.... 'ordered set of objects'? As set is itself datatype of Python ('A set object is an unordered collection of distinct hashable objects.') meaning of this definition is: ordered unordered /blablabla/.
No good. Stick to the definition provided in documentation: "Lists are mutable sequences"
So I went to check next definition (Tuples) and read:
Tuple definition in documentation: 'Tuples are immutable sequences'
Immutable and unchangeable are not the same:
I didn't look any further, but please correct these definitions at least. I recommend to read following sections of Python documentation:
Set types - set, frozenset
Lists
Tuples
Datamodel - Objects, values and types
I randomly opened one chapter (Lists) and read:
Quote:A list is an ordered set of objects in Python.
Hmm.... 'ordered set of objects'? As set is itself datatype of Python ('A set object is an unordered collection of distinct hashable objects.') meaning of this definition is: ordered unordered /blablabla/.
No good. Stick to the definition provided in documentation: "Lists are mutable sequences"
So I went to check next definition (Tuples) and read:
Quote:A tuple is a collection which is ordered and unchangeable. Tuples are similar to lists except that their elements are immutable. Once a tuple is created, the elements, the order of the elements & number of elements can't be changed.
Tuple definition in documentation: 'Tuples are immutable sequences'
Immutable and unchangeable are not the same:
>>> t = ([1, 2, 3], [3, 5, 6]) # tuple with two mutable elements (contrary to definition in tutorial) >>> t[1].append(7) # change second element (contrary to definition in tutorial) >>> t # both element in tuple itself has changed (contrary to definition in tutorial) ([1, 2, 3], [3, 5, 6, 7])From documentation:
Quote:The value of some objects can change. Objects whose value can change are said to be mutable; objects whose value is unchangeable once they are created are called immutable. (The value of an immutable container object that contains a reference to a mutable object can change when the latter’s value is changed; however the container is still considered immutable, because the collection of objects it contains cannot be changed. So, immutability is not strictly the same as having an unchangeable value, it is more subtle.)
I didn't look any further, but please correct these definitions at least. I recommend to read following sections of Python documentation:
Set types - set, frozenset
Lists
Tuples
Datamodel - Objects, values and types
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.