On Mon, Jan 25, 2016 at 9:48 AM, Chris Angelico wrote:
> On Tue, Jan 26, 2016 at 4:32 AM, Random832 wrote:
> > On Mon, Jan 25, 2016, at 12:23, Chris Angelico wrote:
> >> if some translations don't use a token at all,
> >
> > I'm not sure what situation that would be reasonable in.
>
> I don't do
On Tue, Jan 26, 2016 at 4:32 AM, Random832 wrote:
> On Mon, Jan 25, 2016, at 12:23, Chris Angelico wrote:
>> if some translations don't use a token at all,
>
> I'm not sure what situation that would be reasonable in.
I don't do much with different human languages, but it's possible that
you might
On Tue, Jan 26, 2016 at 4:31 AM, Ian Kelly wrote:
>> Do you really want to insist that the format string always used _all_ of the
>> arguments?
>
> Good point, that makes sense. For example, I would expect this to work:
>
> '{0} {2}'.format(*some_list)
>
> as long as some_list has three elements.
On Mon, Jan 25, 2016 at 10:19 AM, MRAB wrote:
>
>
> On 2016-01-25 16:51:36, "Ian Kelly" wrote:
>
>>
>> Why doesn't str.format raise an exception when passed extra positional
>> arguments?
>>
> That format string uses auto-numbering, and it's equivalent to 'The new
> price is {0:.2f}'.
>
> In gene
On Mon, Jan 25, 2016, at 12:23, Chris Angelico wrote:
> if some translations don't use a token at all,
I'm not sure what situation that would be reasonable in.
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, Jan 25, 2016, at 12:19, MRAB wrote:
> Do you really want to insist that the format string always used _all_ of
> the arguments?
Um, yes? Why on earth _wouldn't_ you want to insist that?
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Jan 26, 2016 at 3:51 AM, Ian Kelly wrote:
> On Sun, Jan 24, 2016 at 2:20 PM, MRAB wrote:
>> The format method, on the other hand, belongs to the format string it's
>> attached to. In this example:
>>
>> 'The new price is {}' .format(newPrice, '.2f')
>>
>> the format string is 'The new
On 2016-01-25 16:51:36, "Ian Kelly" wrote:
On Sun, Jan 24, 2016 at 2:20 PM, MRAB
wrote:
The format method, on the other hand, belongs to the format string
it's
attached to. In this example:
'The new price is {}' .format(newPrice, '.2f')
the format string is 'The new price is {}'
On Sun, Jan 24, 2016 at 2:20 PM, MRAB wrote:
> The format method, on the other hand, belongs to the format string it's
> attached to. In this example:
>
> 'The new price is {}' .format(newPrice, '.2f')
>
> the format string is 'The new price is {}' and you're calling its 'format'
> method with
On 2016-01-22 04:57:03, "Michael Sullivan" wrote:
Hi. I'm very very new to python. I have been working my way through a
free python pdf file I found (python3handson.pdf) and I'm having
trouble with one of my programs:
'''discount.py
Exercise 1.14.3.1. * Write a program, discount.py, that
Hi. I'm very very new to python. I have been working my way through a
free python pdf file I found (python3handson.pdf) and I'm having trouble
with one of my programs:
'''discount.py
Exercise 1.14.3.1. * Write a program, discount.py, that prompts the user
for an original price and
for a di
11 matches
Mail list logo