CIS 15 - Cloud Programming in Python - Shared screen with speaker view
why not just use the keys() method in dict?
as in return(list(data.keys()))
i was actually wondering why dict.keys() doesn't return a list like it says it does
return([post['title'] for post in data[username]['posts']])
if (not realname is None):data[username]['name'] = realnameif (not email is None):data[username]['email'] = email
Does that work any differently than .remove()?
so does it do garbage collection like java
remove removes by value
instead of index
so it doesn't work
they all use the dict as an arg
all have to do with the blog?
the all have a blogger argument
all have data
lets get classy
do we really have to call the constructor __init__?
those ugly warts
bubbling to the surface
can it take arguments like a constructor?
I was thinking of something else
then we start thinking about "internal" variables to a class, etc... This is more like programming.
Isn't this supposed to be a "beginners" programming class? :-)
lucky... yea... well... (cough cough)
still not entirely clear on the Self paremeter...
= ultimate pain
its like this in java or c++
self passes the pointer to the object... so if you create different instances of the class, self lets you know which one is calling....
why did they decide to make the convention 'self' instead of 'this'?
person1 = Mike()
person2 = Mike()
person3 = Mike()
I see, thanks
argument = !optional
so person3.nameI() means "self" is pointing to the person3 version of the class
calling it 'self' instead of 'this' seems like needless inconsistency between programming languages
can you have multiple versions of __init__ like constructors in java and C++?
so is there only one copy of the method who_a_i?
can you have BlogPost be an inner class of Blogger?