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


Groups > comp.lang.python > #102040

Re: import locale and print range on same line

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: import locale and print range on same line
Date 2016-01-24 00:58 +1100
Message-ID <mailman.177.1453557489.15297.python-list@python.org> (permalink)
References <2bda88dd-82e3-4e43-b49c-3945a0befdc2@googlegroups.com> <56a37b1e$0$1612$c3e8da3$5496439d@news.astraweb.com> <mailman.176.1453555148.15297.python-list@python.org> <56a383fa$0$1593$c3e8da3$5496439d@news.astraweb.com>

Show all headers | View raw


On Sun, Jan 24, 2016 at 12:45 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> On Sun, 24 Jan 2016 12:19 am, Chris Angelico wrote:
>
>> On Sun, Jan 24, 2016 at 12:07 AM, Steven D'Aprano <steve@pearwood.info>
>> wrote:
>>> On Sat, 23 Jan 2016 09:02 pm, raiwil@gmail.com wrote:
>>>
>>>> However I need to put the code on one single line.
>>>
>>> Why? Is the Enter key on your keyboard broken?
>>
>> Maybe it's for a python -c invocation.
>
>
> [steve@ando ~]$ python -c "for i in range(5):
>>     print 'hello world'
>> "
> hello world
> hello world
> hello world
> hello world
> hello world
> [steve@ando ~]$

Well, not everyone's shells are as awesome as bash... and not everyone
knows you can do that. That said, though... this is a good reason for
giving full context for the question. "I'm trying to X, but I get this
error because of Y. How would I go about fixing Y?" - response:
"Actually, you can do X in a slightly different way.".

Just sayin', there might be other reasons for wanting to put things
onto one line.

ChrisA

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


Thread

import locale and print range on same line raiwil@gmail.com - 2016-01-23 02:02 -0800
  Re: import locale and print range on same line Marko Rauhamaa <marko@pacujo.net> - 2016-01-23 12:36 +0200
    Re: import locale and print range on same line Vlastimil Brom <vlastimil.brom@gmail.com> - 2016-01-23 12:12 +0100
      Re: import locale and print range on same line Ramo <raiwil@gmail.com> - 2016-01-23 03:57 -0800
  Re: import locale and print range on same line Steven D'Aprano <steve@pearwood.info> - 2016-01-24 00:07 +1100
    Re: import locale and print range on same line Chris Angelico <rosuav@gmail.com> - 2016-01-24 00:19 +1100
      Re: import locale and print range on same line Steven D'Aprano <steve@pearwood.info> - 2016-01-24 00:45 +1100
        Re: import locale and print range on same line Chris Angelico <rosuav@gmail.com> - 2016-01-24 00:58 +1100
          Re: import locale and print range on same line Ramo <raiwil@gmail.com> - 2016-01-23 06:03 -0800
            Re: import locale and print range on same line Chris Angelico <rosuav@gmail.com> - 2016-01-24 01:53 +1100
        Re: import locale and print range on same line Terry Reedy <tjreedy@udel.edu> - 2016-01-23 21:45 -0500
        Re: import locale and print range on same line Chris Angelico <rosuav@gmail.com> - 2016-01-24 13:51 +1100
        Re: import locale and print range on same line eryk sun <eryksun@gmail.com> - 2016-01-24 02:00 -0600

csiph-web