Why is this working? The print() function should only work with python3, but this script is compiling with python2? Both python and python2 should be using the python2 interpreter.
>>56119204
lol.
print("text") is compatible with both 2 and 3.
>>56119277
Is that simply because("foo")is the same as"foo"?
>>56119277
no it isn't nigger
I hate Python. It's so shitty and non-specific.
>>56119277
but it's not?
>>56119325
> Is that simply because
> ("foo")
> is the same as
> "foo"
> ?
No, print() is a function that is being fed "Foo" as input.
>>56119356
the print() function isn't a part of python 2, that was introduced in python 3...
>>56119337
>>56119355
It is you fucktards$ python2
Python 2.7.12 (default, Aug 3 2016, 03:10:14)
[GCC 5.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print("faggot")
faggot
>>>
>>56119434
This is the entire point of OP's thread, this shouldn't work. The print function was introduced in python 3.
>>56119475
They patched it so it works the same in both versions
Post on forums or a mailing list. See what kinds of responses you get
Can't you also return("help") even though it's a statement?
>>56119538
I don't buy it. I think my explanation is the most likely >>56119325
This is already covered on SO:
http://stackoverflow.com/questions/12162629/using-print-in-python2-x
>Therefore, to answer the question at hand, print is evaluated as a statement in python 2.x unless youfrom __future__ import print_function
>(introduced in python 2.6)
>>56120004
It was also already explained in this thread, but good to link some independent confirmation
>>56119204
Ubuntu.