Re: Biting the bullet?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Never mind, I read your comment backwards.  Indeed, this looks like a
python2 vs python3 problem.

On 05/22/2015 04:53 PM, Kevin Cummings wrote:
> On 05/22/2015 06:19 AM, Patrick O'Callaghan wrote:
>> On Fri, 2015-05-22 at 00:13 -0400, Kevin Cummings wrote:
>>> print is a function in python.  Its arguments must appear inside ()'s,
>>> just like the error messages tell you.
>>>
>>> ie  not:
>>>
>>>         print input['name']
>>>
>>> but instead:
>>>
>>>         print(input['name'])
>>
>> AFAIK the former would be valid in Python 2, but things changed with
>> Python 3.
> 
> Then why does my python3 interpreter show the following:
> 
> python3
> Python 3.3.2 (default, Dec  4 2014, 12:49:00)
> [GCC 4.8.3 20140911 (Red Hat 4.8.3-7)] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> print 5
>   File "<stdin>", line 1
>     print 5
>           ^
> SyntaxError: invalid syntax
>>>> print(5)
> 5
>>>>
> 
>> poc
>>
> 

-- 
Kevin J. Cummings
kjchome@xxxxxxxxxxx
cummings@xxxxxxxxxxxxxxxxxx
cummings@xxxxxxxxxxxxxxxxxxxxxxx
Registered Linux User #1232 (http://www.linuxcounter.net/)
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux