Skip to main content

Logo

CIS 15 - Cloud Programming in Python (Shared screen with speaker view)
Jacob Rosen
20:14
why not just use the keys() method in dict?
Carter Frost
20:26
list(data.keys())?
Carter Frost
20:34
as in return(list(data.keys()))
Jacob Rosen
20:37
yes
Jacob Rosen
21:53
i was actually wondering why dict.keys() doesn't return a list like it says it does
Jacob Rosen
23:02
ok
Carter Frost
26:01
return([post['title'] for post in data[username]['posts']])
Carter Frost
28:23
if (not realname is None):
Unknown Speaker
00:00
data[username]['name'] = realname
Unknown Speaker
00:00
if (not email is None):
Unknown Speaker
00:00
data[username]['email'] = email
Carter Frost
30:46
return(data[username]['posts'].pop(postNumber))
Tasha Bales
32:32
Does that work any differently than .remove()?
Takashi Tamasu
33:21
so does it do garbage collection like java
Jacob Rosen
33:29
remove removes by value
Jacob Rosen
33:31
instead of index
Jacob Rosen
33:33
so it doesn't work
kyle b
35:02
they all use the dict as an arg
Carter Frost
35:11
all have to do with the blog?
Cameron Kochan
35:25
the all have a blogger argument
Neil Routley
35:29
functions
Takashi Tamasu
35:39
blog database
Carter Frost
35:41
methods
jefferson woodard
35:54
all have data
Carter Frost
35:56
exept load
Carter Frost
36:41
lets get classy
kyle b
47:33
append()
Carter Frost
47:39
list.append()
Jacob Rosen
47:48
"".format()
Neil Routley
48:11
.write
Neil Routley
48:16
.read
Miguel H
48:21
"".strip()
Cameron Kochan
48:23
json.loads(“”)
Neil Routley
48:26
.close
Carter Frost
48:53
app.run(host='0.0.0.0', port=8080)
Marcos Della
48:58
*.*()
Carter Frost
52:08
memeoryz
Carter Frost
55:14
burnham
Carter Frost
57:58
Zuul
Jacob Rosen
58:29
do we really have to call the constructor __init__?
Jacob Rosen
58:32
those ugly warts
Jacob Rosen
58:40
bubbling to the surface
Carter Frost
59:51
initing?
Jacob Rosen
01:00:15
can it take arguments like a constructor?
Marcos Della
01:00:21
nope
Marcos Della
01:00:33
woops, yes
Marcos Della
01:00:43
I was thinking of something else
Jacob Rosen
01:00:47
ah
Marcos Della
01:01:06
def __init__(self,thingy):
Marcos Della
01:02:01
then we start thinking about "internal" variables to a class, etc... This is more like programming.
Marcos Della
01:02:12
Isn't this supposed to be a "beginners" programming class? :-)
Marcos Della
01:02:49
lucky... yea... well... (cough cough)
Marcos Della
01:02:55
(barf)
Carter Frost
01:03:05
ultimate power!
Jeremy Piekarski
01:04:03
still not entirely clear on the Self paremeter...
Marcos Della
01:04:06
= ultimate pain
Carter Frost
01:04:35
its like this in java or c++
Marcos Della
01:04:39
self passes the pointer to the object... so if you create different instances of the class, self lets you know which one is calling....
Jacob Rosen
01:04:49
why did they decide to make the convention 'self' instead of 'this'?
Marcos Della
01:04:49
person1 = Mike()
Marcos Della
01:04:54
person2 = Mike()
Marcos Della
01:04:59
person3 = Mike()
Jeremy Piekarski
01:05:05
I see, thanks
Fergus Gunter
01:05:17
argument = !optional
Marcos Della
01:05:22
so person3.nameI() means "self" is pointing to the person3 version of the class
Jacob Rosen
01:06:05
calling it 'self' instead of 'this' seems like needless inconsistency between programming languages
Carter Frost
01:07:26
mike wazowski
Carter Frost
01:07:38
michael burnham
Fergus Gunter
01:07:44
ferguson
Jacob Rosen
01:09:13
can you have multiple versions of __init__ like constructors in java and C++?
Carter Frost
01:09:35
so is there only one copy of the method who_a_i?
Jacob Rosen
01:50:40
can you have BlogPost be an inner class of Blogger?
Carter Frost
01:56:19
breaks everything