Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"All we are given is possibilities -- to make ourselves one thing or another." -- Ortega y Gasset


devel / comp.lang.python / Re: Problem with python

SubjectAuthor
o Re: Problem with pythonGrant Edwards

1
Re: Problem with python

<mailman.632.1630809320.4164.python-list@python.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=19424&group=comp.lang.python#19424

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: grant.b.edwards@gmail.com (Grant Edwards)
Newsgroups: comp.lang.python
Subject: Re: Problem with python
Date: Sun, 5 Sep 2021 02:11:50 -0000 (UTC)
Lines: 31
Message-ID: <mailman.632.1630809320.4164.python-list@python.org>
References: <CA+FnnTwxA+-cm--ff-KD-gv91G5_TFi18OM=tfmzM1cHR05=sA@mail.gmail.com>
<66abcd73-b5eb-8646-a107-fcd673c2f3fb@DancesWithMice.info>
<CA+FnnTyqx6BbPCZciboj+=aSvDKzDOQJiBHxgnt07yDsTogLkw@mail.gmail.com>
<YTPN+zKbDhHq2cd8@hjp.at> <sh1916$e21$1@ciao.gmane.io>
X-Trace: news.uni-berlin.de YPXqzl0CYVCGI/pkQlnUyAFlFoH3mpqmc2lYmHt88z5Q==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.000
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'jul': 0.04;
'subject:python': 0.06; 'linux': 0.07; 'aug': 0.09; 'message-
id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'yes.': 0.09;
'import': 0.14; '(1,': 0.16; '__future__': 0.16;
'from:addr:grant.b.edwards': 0.16; 'from:name:grant edwards':
0.16; 'holzer': 0.16; 'received:116.202': 0.16;
'received:116.202.254': 0.16; 'received:116.202.254.214': 0.16;
'redundant': 0.16; 'wrote:': 0.16; 'syntax': 0.16; 'python': 0.16;
'to:addr:python-list': 0.23; '>>>': 0.26; 'function': 0.28;
'header:User-Agent:1': 0.31; "doesn't": 0.32; 'unless': 0.33;
'same': 0.34; 'from:addr:gmail.com': 0.35; "it's": 0.38;
'produce': 0.69; 'received:116': 0.71; 'really.': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: slrn/1.0.3 (Linux)
X-Mailman-Approved-At: Sat, 04 Sep 2021 22:35:18 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <sh1916$e21$1@ciao.gmane.io>
X-Mailman-Original-References: <CA+FnnTwxA+-cm--ff-KD-gv91G5_TFi18OM=tfmzM1cHR05=sA@mail.gmail.com>
<66abcd73-b5eb-8646-a107-fcd673c2f3fb@DancesWithMice.info>
<CA+FnnTyqx6BbPCZciboj+=aSvDKzDOQJiBHxgnt07yDsTogLkw@mail.gmail.com>
<YTPN+zKbDhHq2cd8@hjp.at>
 by: Grant Edwards - Sun, 5 Sep 2021 02:11 UTC

On 2021-09-04, Peter J. Holzer <hjp-python@hjp.at> wrote:
> On 2021-09-04 14:29:47 -0500, Igor Korot wrote:
>> Will this syntax work in python 2?
>
> Yes. It's just a redundant pair of parentheses.

Not really. With the parens, it doesn't produce the same results in
2.x unless you import the print function from the future:

Python 3.9.6 (default, Aug 9 2021, 12:35:39)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print(1,2)
1 2

Python 2.7.18 (default, Jul 18 2021, 14:51:54)
[GCC 10.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print(1,2)
(1, 2)

Python 2.7.18 (default, Jul 18 2021, 14:51:54)
[GCC 10.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import print_function
>>> print(1,2)
1 2


devel / comp.lang.python / Re: Problem with python

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor