SlideShare a Scribd company logo
by Python
            Yoshiori SHOJI




2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
!?
2009   12   12
2009   12   12
name:$>




2009   12   12
Yoshiori SHOJI



2009   12   12
email:$>




2009   12   12
yoshiori@gmail.com



2009   12   12
site:$>




2009   12   12
http://yoshiori.org/



2009   12   12
company:$>




2009   12   12
DWANGO Co.,Ltd.



2009   12   12
2009   12   12
P y t h o n
2009   12   12
P y t h o n
2009   12   12
yoshiori $




2009   12   12
import this




2009   12   12
The Zen
                     of
                 Python
                  Python   ’   ’
2009   12   12
2009   12   12
Python




       Unicode




2009   12   12
Python    http
                     ://ja
                          .wik
                              iped
                                  ia.o
                                      rg/w
                                          iki/P
       Unicode                                 ytho
                                                   n


2009   12   12
2009   12   12
Guido

                                                   !!

                                                        !!

                                              !!

                         "Battery Included"




2009   12   12
Ruby
            LL        C


            Scala   Groovy            JVM
                        JavaScript
                          prototype

2009   12   12
2009   12   12
2009   12   12
!!
2009   12   12
!?
2009   12   12
?

                 if(foo == bar){foo.hoge();}
                     bar.hoge();
                 foo.hoge(bar);bar.hoge(foo);
                 if(hoge != foo)
                     hoge.hoge();
                     foo.hoge();

2009   12   12
2009   12   12
2009   12   12
2009   12   12
!?
2009   12   12
end = None
                 :
                 :
                 def foo():
                     print ‘hoge’
                 end


2009   12   12
end = None
                 :
                 :
                 def foo():
                     print ‘hoge’
                 end


2009   12   12
end = None
                 :
                 :
                 def foo():
                     print ‘hoge’
                 end


2009   12   12
!! Python
                 ”   ”


                         ”   ”


2009   12   12
2009   12   12
2009   12   12
!?
2009   12   12
def foo():
                     return 'hoge'



                 foo()




                 foo




2009   12   12
(call            )
                 def foo():
                      return 'hoge'

                 def bar(func):
                     print func()

                 bar(foo) # ‘hoge’
2009   12   12
(
                 )
2009   12   12
2009   12   12
self

2009   12   12
!?
2009   12   12
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
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
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
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
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
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
this


                   ?


2009   12   12
2009   12   12
PHP      Perl




2009   12   12
!?
2009   12   12
!!




2009   12   12
!!




2009   12   12
2009   12   12
2009   12   12
P y h o n




2009   12   12
P y h o n




2009   12   12
2009   12   12
5




2009   12   12
5
                 nil




2009   12   12
5
                 nil
                 true




2009   12   12
5
                 nil
                 true
                 false


2009   12   12
5
                 nil
                 true
                 false
                 this

2009   12   12
5
                 nil
                 true
                 false
                 this
                 super
2009   12   12
5
                 nil         None
                 true        True
                 false       False
                 this        self
                 super       super
2009   12   12
5
                 nil         None
                 true        True
                 false       False
                 this        self
                 super       super
2009   12   12
ALGOL




2009   12   12
DRY




2009   12   12
2009   12   12
2009   12   12
help(fizzbuzz)




2009   12   12
help(fizzbuzz)




2009   12   12
help(fizzbuzz)




2009   12   12
2
2009   12   12
"Battery Included"



2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
2009   12   12
Guido



2009   12   12
2009   12   12

More Related Content

世界一言語トークス by Python