Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Perl allows you to change the definition of false to make it true. (And vice versa.)

by LanX (Canon)
on Dec 12, 2012 at 22:50 UTC ( #1008604=note: print w/ replies, xml ) Need Help??


in reply to Perl allows you to change the definition of false to make it true. (And vice versa.)

And as usual it's far easier in Python! ;-)

>python Python 2.5.2 (r252:60911, Jan 20 2010, 23:16:55) [GCC 4.3.2] on linux2 >>> False, True = True, False >>> False True >>> True False

Python rules obfuscation!

Cheers Rolf


Comment on Re: Perl allows you to change the definition of false to make it true. (And vice versa.)
Download Code
Re^2: Perl allows you to change the definition of false to make it true. (And vice versa.)
by tobyink (Abbot) on Dec 13, 2012 at 14:30 UTC

    Python allows you to redefine the "constants" True and False, but that doesn't change the behaviour of...

    >>> "foo"=="bar" False
    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
      So Python is easier to brake, but is incomplete in this attempt? ;-)

      Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1008604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2014-09-23 06:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls