Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #88194

Re: Proposal for new minor syntax

References <CAPauRLMMAT-OffHTYW6GPybAZzouc7H9BjrmvVQiSig0X3x+ig@mail.gmail.com> <mailman.282.1427499534.10327.python-list@python.org> <ptrbha1f8b7rgjoo3idtflpg3fsrtmvs9t@4ax.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2015-03-27 18:55 -0600
Subject Re: Proposal for new minor syntax
Newsgroups comp.lang.python
Message-ID <mailman.283.1427504164.10327.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Mar 27, 2015 at 6:33 PM, Mario Figueiredo <marfig@gmail.com> wrote:
> 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...

It depends somewhat on context. In the variable-width font that I'm
reading my email in, the dot looks like a single pixel and doesn't
create much visual spacing either. It would be very easy to miss. In a
terminal window with Courier New on the other hand, it does look
distinctive enough to be noticeable.  We should keep in mind though
that our code isn't always going to be read in Courier New.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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