SlideShare a Scribd company logo
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

More Related Content

PDF
5 1. character processing
PDF
Purely Functional Data Structures ex3.3 leftist heap
DOCX
Program membalik kata
DOC
Computer hw1
PDF
GECon2017_Cpp a monster that no one likes but that will outlast them all _Ya...
PDF
GECon 2017: C++ - a Monster that no one likes but that will outlast them all
PDF
The Big Three
PDF
OOP 2012 - Hint: Dynamic allocation in c++
5 1. character processing
Purely Functional Data Structures ex3.3 leftist heap
Program membalik kata
Computer hw1
GECon2017_Cpp a monster that no one likes but that will outlast them all _Ya...
GECon 2017: C++ - a Monster that no one likes but that will outlast them all
The Big Three
OOP 2012 - Hint: Dynamic allocation in c++

What's hot (7)

PDF
Haskell
PPT
F(x) terminology
PDF
Semi vae memo (2)
PDF
Semi vae memo (1)
PDF
Histogram
PDF
Reverse string
DOCX
Public string sacar
Haskell
F(x) terminology
Semi vae memo (2)
Semi vae memo (1)
Histogram
Reverse string
Public string sacar
Ad

More from Yoshiori Shoji (20)

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

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