Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #88193
| From | Mario Figueiredo <marfig@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Proposal for new minor syntax |
| Date | 2015-03-28 01:33 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <ptrbha1f8b7rgjoo3idtflpg3fsrtmvs9t@4ax.com> (permalink) |
| References | <CAPauRLMMAT-OffHTYW6GPybAZzouc7H9BjrmvVQiSig0X3x+ig@mail.gmail.com> <mailman.282.1427499534.10327.python-list@python.org> |
On Sat, 28 Mar 2015 10:39:04 +1100, Ben Finney
<ben+python@benfinney.id.au> wrote:
>Jamie Willis <jw14896.2014@my.bristol.ac.uk> writes:
>
>> This could be written as:
>>
>> hello = "hello world "
>> hello .= strip()
>
>?1, “.=” is visually too similar to “=”.
can't be much worse than
hello = "hello world ",
I think the dot next to the equal sign makes it very distinctive. The
equal sign is something we are so visually used to that any small
deviation gets immediately recognized by our brain. I may be wrong on
this assumption...
>
>Syntax that is ambiguous at a glance is a cost when reading, and here I
>think the cost is great.
I think the bigger issue here is consistency. And I like my
programming languages to sport consistent syntax and semantics. Or at
least to remain onsistent unless there is a good reason not to.
In Python the dot sign isn't an operator. It is a delimiter. So it
feels odd for me to see it treated as an operator. More precisely, in
Python, delimiters that form an augmented assignment operator consist
of an operator followed by the equal sign delimiter. This proposal
would be the only exception.
I'm personally not very found of that.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Proposal for new minor syntax Ben Finney <ben+python@benfinney.id.au> - 2015-03-28 10:39 +1100
Re: Proposal for new minor syntax Mario Figueiredo <marfig@gmail.com> - 2015-03-28 01:33 +0100
Re: Proposal for new minor syntax Ian Kelly <ian.g.kelly@gmail.com> - 2015-03-27 18:55 -0600
Re: Proposal for new minor syntax Rustom Mody <rustompmody@gmail.com> - 2015-03-27 21:18 -0700
VB/Pascal with statement [was Re: Proposal for new minor syntax] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 17:26 +1100
Re: VB/Pascal with statement [was Re: Proposal for new minor syntax] Chris Angelico <rosuav@gmail.com> - 2015-03-28 17:40 +1100
Re: VB/Pascal with statement [was Re: Proposal for new minor syntax] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-28 12:26 +0000
Re: VB/Pascal with statement [was Re: Proposal for new minor syntax] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-03-28 23:58 +1100
Re: VB/Pascal with statement [was Re: Proposal for new minor syntax] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-03-28 13:44 +0000
Re: VB/Pascal with statement [was Re: Proposal for new minor syntax] Rustom Mody <rustompmody@gmail.com> - 2015-03-28 09:21 -0700
Re: VB/Pascal with statement [was Re: Proposal for new minor syntax] Rustom Mody <rustompmody@gmail.com> - 2015-03-28 09:32 -0700
Re: Proposal for new minor syntax Giorgos Tzampanakis <giorgos.tzampanakis@gmail.com> - 2015-04-08 22:11 +0000
csiph-web