SlideShare ist ein Scribd-Unternehmen logo
1 von 64
Downloaden Sie, um offline zu lesen
by Python
            Yoshiori SHOJI




2009   12   14
by Python
            Yoshiori SHOJI




2009   12   14
Python




2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
J a v a
2009   12   14
J a v a
2009   12   14
a s a k u s a .




2009   12   14
a s a k u s a .




2009   12   14
2009   12   14
!!
2009   12   14
def hoge():
                     print 'foo'
                     print 'bar'




2009   12   14
def hoge():
                        print 'foo'
                        print 'bar'


             def hoge(): print 'foo' print 'bar'

2009   12   14
def hoge():
                        print 'foo'
                        print 'bar'




2009   12   14            X
             def hoge(): print 'foo' print 'bar'
2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
2009   12   14
irb(main):014:0> p 1 && 2
                 2
                 => nil
                 irb(main):015:0> p 1 || 2
                 1
                 => nil
                      >>> print 1 and 2
                      2
                      >>> print 1 or 2
                      1
2009   12   14
irb(main):014:0> p 1 && 2
                 2
                 => nil
                 irb(main):015:0> p 1 || 2
                 1
                 => nil
                      >>> print 1 and 2
                      2
                      >>> print 1 or 2
                      1
2009   12   14
2009   12   14
2009   12   14
foo() and bar()




2009   12   14
foo() and bar()




2009   12   14
foo() and bar()




2009   12   14
foo() and bar()




                 [ foo() ] and bar()


2009   12   14
foo() and bar()




                 [ foo() ] and bar()


2009   12   14
2009   12   14
[ foo() ] and bar()




2009   12   14
[ foo() ] and bar()




2009   12   14
[ foo() ] and bar()


                 [foo(), bar(), hoge(),]



2009   12   14
if A :
                     foo()
                     bar()




2009   12   14
if A :
                     foo()
                     bar()
   [ foo() ] and [ bar() ] if A else True


2009   12   14
if A :
                     foo()
                     bar()
   [ foo() ] and [ bar() ] if A else True


2009   12   14
2009   12   14
[[ foo() ] and [ bar() ] if A else True ]




2009   12   14
[[ foo() ] and [ bar() ] if A else True ]




2009   12   14
[[ foo() ] and [ bar() ] if A else True ]




                 [A and [ foo() ] and [ bar() ]]
2009   12   14
2009   12   14
2009   12   14
for x in range(10) :
                    foo( x )



2009   12   14
for x in range(10) :
                    foo( x )

                 [ foo( x ) for x in range(10) ]
2009   12   14
2009   12   14
def hoge( data ):
         return [foo()] and bar( data )




2009   12   14
def hoge( data ):
         return [foo()] and bar( data )




2009   12   14
def hoge( data ):
         return [foo()] and bar( data )



   hoge = lambda data :([foo()] and bar
   ( data ) )
2009   12   14
2009   12   14
import sys;[sys.stdout.write(data)]




       globals().__setitem__("setitem",
       globals().__setitem__)
2009   12   14
2009   12   14
2009   12   14
import sys,os,urllib,time;[[[globals
().__setitem__('url','http://www.bijint.com/
jp/img/photo/%02d%02d.jpg' % (i, j))] and
[globals().__setitem__('file',open
(os.path.basename(url), 'wb'))] and
[file.write(urllib.urlopen(url).read())] and
[file.close()] and [time.sleep(5)] for j in
range(60)] for i in range(24)]


2009   12   14
import sys;[globals().__setitem__("setitem", globals().__setitem__)]
and [setitem('isSun',lambda : sys.platform.find('java') > -1)] and
[setitem('p',lambda data :(isSun() and ([globals().__setitem__
('java',__import__('java'))] and [java.lang.System.out.write
(java.lang.String(data).getBytes("utf-8"))] and [sys.stdout.write
('n')]) or [sys.stdout.write(data + 'n')]))] and [setitem
('fizbuz',lambda i :([setitem('fiz','Fiz')] and [setitem('buz','Buz')]
and [setitem('ret','')] and [isSun() and ([setitem('fiz','      ')]
and [setitem('buz','    ')])]   and [i % 3 == 0 and setitem('ret',
globals().get('ret') + fiz)] and [i % 5 == 0 and setitem('ret',
globals().get('ret') + buz)] and [len(globals().get('ret')) == 0 and
setitem('ret', str(i))] and ret))] and [p(fizbuz(i)) for i in xrange
(20)]



2009   12   14
2009   12   14
!!
2009   12   14
!!
2009   12   14
2009   12   14

Weitere ähnliche Inhalte

Was ist angesagt? (7)

Haskell
HaskellHaskell
Haskell
 
F(x) terminology
F(x) terminologyF(x) terminology
F(x) terminology
 
Semi vae memo (2)
Semi vae memo (2)Semi vae memo (2)
Semi vae memo (2)
 
Semi vae memo (1)
Semi vae memo (1)Semi vae memo (1)
Semi vae memo (1)
 
Histogram
HistogramHistogram
Histogram
 
Reverse string
Reverse stringReverse string
Reverse string
 
Public string sacar
Public string sacarPublic string sacar
Public string sacar
 

Mehr von Yoshiori Shoji

Chain of Responsibility
Chain of ResponsibilityChain of Responsibility
Chain of Responsibility
Yoshiori Shoji
 
世界一言語トークス by Python
世界一言語トークス by Python世界一言語トークス by Python
世界一言語トークス by Python
Yoshiori Shoji
 
AjaxComponent の作り方
AjaxComponent の作り方AjaxComponent の作り方
AjaxComponent の作り方
Yoshiori Shoji
 
僕と Python と 時々 NetBeans
僕と Python と 時々 NetBeans僕と Python と 時々 NetBeans
僕と Python と 時々 NetBeans
Yoshiori Shoji
 
僕のみた関数型言語
僕のみた関数型言語僕のみた関数型言語
僕のみた関数型言語
Yoshiori Shoji
 
「Pit」で救う世界
「Pit」で救う世界「Pit」で救う世界
「Pit」で救う世界
Yoshiori Shoji
 
次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~
次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~
次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~
Yoshiori Shoji
 
LL魂に入れて貰えなかったJavaFXScript(仮)
LL魂に入れて貰えなかったJavaFXScript(仮)LL魂に入れて貰えなかったJavaFXScript(仮)
LL魂に入れて貰えなかったJavaFXScript(仮)
Yoshiori Shoji
 

Mehr von Yoshiori Shoji (20)

輪るテストドリブン
輪るテストドリブン輪るテストドリブン
輪るテストドリブン
 
Chain of Responsibility
Chain of ResponsibilityChain of Responsibility
Chain of Responsibility
 
ポジションペーパー
ポジションペーパーポジションペーパー
ポジションペーパー
 
三周遅れのXP
三周遅れのXP三周遅れのXP
三周遅れのXP
 
世界一言語トークス by Python
世界一言語トークス by Python世界一言語トークス by Python
世界一言語トークス by Python
 
tdd
tddtdd
tdd
 
outputz
outputzoutputz
outputz
 
AjaxComponent の作り方
AjaxComponent の作り方AjaxComponent の作り方
AjaxComponent の作り方
 
OSC 2009 Tokyo/Spring 勉強会大集合LT
OSC 2009 Tokyo/Spring 勉強会大集合LTOSC 2009 Tokyo/Spring 勉強会大集合LT
OSC 2009 Tokyo/Spring 勉強会大集合LT
 
Devsumi2009(配布)
Devsumi2009(配布)Devsumi2009(配布)
Devsumi2009(配布)
 
僕と Python と 時々 NetBeans
僕と Python と 時々 NetBeans僕と Python と 時々 NetBeans
僕と Python と 時々 NetBeans
 
僕のみた関数型言語
僕のみた関数型言語僕のみた関数型言語
僕のみた関数型言語
 
「Pit」で救う世界
「Pit」で救う世界「Pit」で救う世界
「Pit」で救う世界
 
what\'s lift
what\'s liftwhat\'s lift
what\'s lift
 
wicket の W は(笑)の W
wicket の W は(笑)の Wwicket の W は(笑)の W
wicket の W は(笑)の W
 
モテ Wicket
モテ Wicketモテ Wicket
モテ Wicket
 
次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~
次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~
次世代ウェブフレームワークの幕開け ~ステートフルはじめました/君が僕を望むなら僕は君を忘れない~
 
801勉強会Lt
801勉強会Lt801勉強会Lt
801勉強会Lt
 
Wicket
WicketWicket
Wicket
 
LL魂に入れて貰えなかったJavaFXScript(仮)
LL魂に入れて貰えなかったJavaFXScript(仮)LL魂に入れて貰えなかったJavaFXScript(仮)
LL魂に入れて貰えなかったJavaFXScript(仮)
 

(裏)世界一言語トークス by Python