More Related Content
More from Yoshiori Shoji (20)
世界一言語トークス by Python
- 19. P y t h o n
2009 12 12
- 20. P y t h o n
2009 12 12
- 23. The Zen
of
Python
Python ’ ’
2009 12 12
- 26. Python http
://ja
.wik
iped
ia.o
rg/w
iki/P
Unicode ytho
n
2009 12 12
- 28. Guido
!!
!!
!!
"Battery Included"
2009 12 12
- 29. Ruby
LL C
Scala Groovy JVM
JavaScript
prototype
2009 12 12
- 34. ?
if(foo == bar){foo.hoge();}
bar.hoge();
foo.hoge(bar);bar.hoge(foo);
if(hoge != foo)
hoge.hoge();
foo.hoge();
2009 12 12
- 39. end = None
:
:
def foo():
print ‘hoge’
end
2009 12 12
- 40. end = None
:
:
def foo():
print ‘hoge’
end
2009 12 12
- 41. end = None
:
:
def foo():
print ‘hoge’
end
2009 12 12
- 47. (call )
def foo():
return 'hoge'
def bar(func):
print func()
bar(foo) # ‘hoge’
2009 12 12
- 52. class Hoge(object):
pass
hoge = Hoge()
hoge.a = 10 // hoge a
hoge.b = 'hoge'
print hoge.a // 10
print hoge.b // hoge
2009 12 12
- 53. def initialize(obj, a, b):
obj.a = a
obj.b = b
class Hoge(object):
pass
hoge = Hoge()
initialize(hoge, 10, 'hoge') //
print hoge.a // 10
print hoge.b // hoge
2009 12 12
- 54. class Hoge(object):
def initialize(obj, a, b):
obj.a = a
obj.b = b
hoge = Hoge()
Hoge.initialize(hoge, 10, 'hoge')
//
print hoge.a // 10
print hoge.b // hoge
2009 12 12
- 55. class Hoge(object):
def initialize(obj, a, b):
obj.a = a
obj.b = b
hoge = Hoge()
Hoge.initialize(hoge, 10, 'hoge')
hoge.initialize(10,'hoge')
//
print hoge.a // 10
print hoge.b // hoge
2009 12 12
- 56. class Hoge(object):
def __init__(obj , a, b):
obj.a = a
obj.b = b
hoge = Hoge(10,'hoge')
//
print hoge.a // 10
print hoge.b // hoge
2009 12 12
- 57. class Hoge(object):
def __init__(obj , a, b):
self
self.a == aa
obj.a
self.b == bb
obj.b
hoge = Hoge(10,'hoge')
//
print hoge.a // 10
print hoge.b // hoge
2009 12 12
- 71. 5
nil
true
2009 12 12
- 72. 5
nil
true
false
2009 12 12
- 73. 5
nil
true
false
this
2009 12 12
- 74. 5
nil
true
false
this
super
2009 12 12
- 75. 5
nil None
true True
false False
this self
super super
2009 12 12
- 76. 5
nil None
true True
false False
this self
super super
2009 12 12