On Tue, Jun 25, 2013 at 9:59 PM, Robert Kern wrote:
> On 2013-06-25 12:48, Chris Angelico wrote:
>>
>> On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern
>> wrote:
>>>
>>> There is quite a bit of Python's lexical analysis that is specified in
>>> places other than the formal notation. That does not mea
On 2013-06-25 12:48, Chris Angelico wrote:
On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern wrote:
There is quite a bit of Python's lexical analysis that is specified in
places other than the formal notation. That does not mean it is undefined.
It is well defined in the lexer code and the documenta
On Tue, Jun 25, 2013 at 9:19 PM, Robert Kern wrote:
> There is quite a bit of Python's lexical analysis that is specified in
> places other than the formal notation. That does not mean it is undefined.
> It is well defined in the lexer code and the documentation. You suggest that
> a "rule probabl
On 2013-06-25 01:22, Mark Janssen wrote:
On Mon, Jun 24, 2013 at 4:48 PM, alex23 wrote:
On 23/06/2013 3:43 AM, Mark Janssen wrote:
There was a recent discussion about this (under "implicit string
concatenation"). It seems this is a part of the python language
specification that was simply un
On Mon, Jun 24, 2013 at 4:48 PM, alex23 wrote:
> On 23/06/2013 3:43 AM, Mark Janssen wrote:
>>
>> There was a recent discussion about this (under "implicit string
>> concatenation"). It seems this is a part of the python language
>> specification that was simply undefined.
>
>
> It's part of the
On 23/06/2013 3:43 AM, Mark Janssen wrote:
There was a recent discussion about this (under "implicit string
concatenation"). It seems this is a part of the python language
specification that was simply undefined.
It's part of the language reference, not an accidental artifact:
http://docs.pyth
On 6/22/2013 9:20 PM, MRAB wrote:
[snip]
One vs not-one isn't good enough. Some languages use the singular with
any numbers ending in '1'. Some languages have singular, dual, and
plural. Etc. It's surprising how inventive people can be! :-)
In the Idle output window for file grepping, I just c
In article <51c66a03$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> On Sat, 22 Jun 2013 23:12:49 -0400, Roy Smith wrote:
> > Number 2 on the list is "Months have either 30 or 31 days", which was
> > obviously believed by whoever made this sign: http://tinyurl.com/mgv39on
On Sun, Jun 23, 2013 at 12:58 PM, Steven D'Aprano
wrote:
> On Sun, 23 Jun 2013 02:20:56 +0100, MRAB wrote:
>
>> One vs not-one isn't good enough. Some languages use the singular with
>> any numbers ending in '1'. Some languages have singular, dual, and
>> plural. Etc. It's surprising how inventive
On Sun, Jun 23, 2013 at 1:22 PM, Steven D'Aprano
wrote:
> On Sat, 22 Jun 2013 23:12:49 -0400, Roy Smith wrote:
>
>> In article <51c66455$0$2$c3e8da3$54964...@news.astraweb.com>,
>> Steven D'Aprano wrote:
>>
>>> http://infiniteundo.com/post/25326999628/falsehoods-programmers-
> believe-about-
On Sat, 22 Jun 2013 23:12:49 -0400, Roy Smith wrote:
> In article <51c66455$0$2$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
>> http://infiniteundo.com/post/25326999628/falsehoods-programmers-
believe-about-
>> time
>
> Number 2 on the list is "Months have either 30 or 3
In article <51c66455$0$2$c3e8da3$54964...@news.astraweb.com>,
Steven D'Aprano wrote:
> http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-
> time
Number 2 on the list is "Months have either 30 or 31 days", which was
obviously believed by whoever made this sign: h
On Sun, 23 Jun 2013 02:20:56 +0100, MRAB wrote:
> One vs not-one isn't good enough. Some languages use the singular with
> any numbers ending in '1'. Some languages have singular, dual, and
> plural. Etc. It's surprising how inventive people can be! :-)
This is a good time to link to these intere
On Sun, Jun 23, 2013 at 10:48 AM, Rick Johnson
wrote:
> On Saturday, June 22, 2013 6:12:50 PM UTC-5, Chris Angelico wrote:
>> As a general rule, I don't like separating format strings and their
>> arguments.
>
> Huh? Format strings don't take arguments because Python's built-in string
> type is n
On 06/22/2013 09:20 PM, MRAB wrote:
On 23/06/2013 00:56, Dave Angel wrote:
Certainly the reorderability of the format string is significant. Not
only can it be reordered, but more than one instance of some of the
values is permissible if needed. (What's missing is a decent handling
of
On 23/06/2013 00:56, Dave Angel wrote:
On 06/22/2013 07:37 PM, Chris Angelico wrote:
On Sun, Jun 23, 2013 at 9:28 AM, Dave Angel wrote:
On 06/22/2013 07:12 PM, Chris Angelico wrote:
On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
wrote:
_fmtstr = "Item wrote to MongoDB database {0}, {1}
On Saturday, June 22, 2013 6:12:50 PM UTC-5, Chris Angelico wrote:
> As a general rule, I don't like separating format strings and their
> arguments.
Huh? Format strings don't take arguments because Python's built-in string type
is not callable.
py> callable("")
False
"Format string" is ju
On 06/22/2013 08:27 PM, Chris Angelico wrote:
On Sun, Jun 23, 2013 at 9:56 AM, Dave Angel wrote:
On 06/22/2013 07:37 PM, Chris Angelico wrote:
On the contrary, i18n should be done with config files. The format
string
**as specified in the physical program**
is the key to the actual stri
On Sun, Jun 23, 2013 at 9:56 AM, Dave Angel wrote:
> On 06/22/2013 07:37 PM, Chris Angelico wrote:
>>> On the contrary, i18n should be done with config files. The format
>>> string
>
>
> **as specified in the physical program**
>
>
>>> is the key to the actual string which is located in the file/
On 06/22/2013 07:37 PM, Chris Angelico wrote:
On Sun, Jun 23, 2013 at 9:28 AM, Dave Angel wrote:
On 06/22/2013 07:12 PM, Chris Angelico wrote:
On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
wrote:
_fmtstr = "Item wrote to MongoDB database {0}, {1}"
msg = _fmtstr.format(_arg1, _arg2)
On Sun, Jun 23, 2013 at 9:28 AM, Dave Angel wrote:
> On 06/22/2013 07:12 PM, Chris Angelico wrote:
>>
>> On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
>> wrote:
>>>
>>>_fmtstr = "Item wrote to MongoDB database {0}, {1}"
>>>msg = _fmtstr.format(_arg1, _arg2)
>>
>>
>> As a general rule, I d
On 06/22/2013 07:12 PM, Chris Angelico wrote:
On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
wrote:
_fmtstr = "Item wrote to MongoDB database {0}, {1}"
msg = _fmtstr.format(_arg1, _arg2)
As a general rule, I don't like separating format strings and their
arguments. That's one of the more
On Sun, Jun 23, 2013 at 1:24 AM, Rick Johnson
wrote:
> _fmtstr = "Item wrote to MongoDB database {0}, {1}"
> msg = _fmtstr.format(_arg1, _arg2)
As a general rule, I don't like separating format strings and their
arguments. That's one of the more annoying costs of i18n. Keep them in
a single e
In article
,
Mark Janssen wrote:
> > Also remember when entering long lines of text that strings concatenate
> > within parenthesis.
> > So,
> > ("a, b, c"
> > "d, e, f"
> > "g, h, i")
> >
> > Is the same as ("a, b, cd, e, fg, h, i")
> There was a recent discussion about this (under "implicit s
On 22 June 2013 18:28, Alister wrote:
> On Sat, 22 Jun 2013 17:11:00 +0100, Joshua Landau wrote:
>
>> On 22 June 2013 16:55, Rick Johnson
>> wrote:
>>> On Saturday, June 22, 2013 10:40:24 AM UTC-5, Joshua Landau wrote:
> Plus, your use of the format syntax is incorrect.
Wut?
>>>
>>> Wel
> Also remember when entering long lines of text that strings concatenate
> within parenthesis.
> So,
> ("a, b, c"
> "d, e, f"
> "g, h, i")
>
> Is the same as ("a, b, cd, e, fg, h, i")
There was a recent discussion about this (under "implicit string
concatenation"). It seems this is a part of the
On Sat, 22 Jun 2013 17:11:00 +0100, Joshua Landau wrote:
> On 22 June 2013 16:55, Rick Johnson
> wrote:
>> On Saturday, June 22, 2013 10:40:24 AM UTC-5, Joshua Landau wrote:
>>> > Plus, your use of the format syntax is incorrect.
>>> Wut?
>>
>> Well what i mean exactly is not that it's illegal, i
On 22 June 2013 16:55, Rick Johnson wrote:
> On Saturday, June 22, 2013 10:40:24 AM UTC-5, Joshua Landau wrote:
>> > Plus, your use of the format syntax is incorrect.
>> Wut?
>
> Well what i mean exactly is not that it's illegal, i just
> find the use of the "getattr sugar", from WITHIN the format
On Saturday, June 22, 2013 10:40:24 AM UTC-5, Joshua Landau wrote:
> > Plus, your use of the format syntax is incorrect.
> Wut?
Well what i mean exactly is not that it's illegal, i just
find the use of the "getattr sugar", from WITHIN the format
string, to be excessively noisy.
In short, i don't
On 22 June 2013 14:36, Joshua Landau wrote:
> My favourite way would be along the lines of:
>
> message = "Item wrote to MongoDB database "
> message += "{0[MONGODB_DB]}/{0[MONGODB_COLLECTION]}".format(settings)
> log.msg(message, level=log.DEBUG, spider=spider)
To make a habit of replying to mys
On 22 June 2013 16:24, Rick Johnson wrote:
> On Saturday, June 22, 2013 8:36:43 AM UTC-5, Joshua Landau wrote:
>> message = "Item wrote to MongoDB database "
>> message += "{0[MONGODB_DB]}/{0[MONGODB_COLLECTION]}".format(settings)
>> log.msg(message, level=log.DEBUG, spider=spider)
>
> If you're g
On Saturday, June 22, 2013 8:36:43 AM UTC-5, Joshua Landau wrote:
> message = "Item wrote to MongoDB database "
> message += "{0[MONGODB_DB]}/{0[MONGODB_COLLECTION]}".format(settings)
> log.msg(message, level=log.DEBUG, spider=spider)
If you're going to whore out parts of the string to
variables i
On 22/06/2013 14:36, Joshua Landau wrote:
On 21 June 2013 23:26, Gary Herron wrote:
On 06/21/2013 02:17 PM, Yves S. Garret wrote:
I have the following line of code:
log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
settings['MONGODB_COLLECTION']), level=log.DEBUG, spider
On 22 June 2013 14:36, Joshua Landau wrote:
> message = "Item wrote to MongoDB database "
Pedant's note:
"Item *written* to MongoDB database"
--
http://mail.python.org/mailman/listinfo/python-list
On 21 June 2013 23:26, Gary Herron wrote:
> On 06/21/2013 02:17 PM, Yves S. Garret wrote:
>> I have the following line of code:
>> log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
>> settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider)
<...>
>> I was thinking of
"Yves S. Garret" writes:
> I have the following line of code:
> log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
> settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider)
[…]
> Is this ok? Are there any rules in Python when it comes to breaking up
> long lines of
Yves S. Garret wrote:
> Hi, I have a question about breaking up really long lines of code in
> Python.
>
> I have the following line of code:
> log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
> settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider)
>
> Given th
On Fri, 21 Jun 2013 17:48:54 -0400, Ray Cote wrote:
> Also remember when entering long lines of text that strings concatenate
> within parenthesis. So,
> ("a, b, c"
> "d, e, f"
> "g, h, i")
>
> Is the same as ("a, b, cd, e, fg, h, i")
Technically, you don't need the parentheses. You can also us
On 6/21/2013 5:17 PM, Yves S. Garret wrote:
Hi, I have a question about breaking up really long lines of code in Python.
I have the following line of code:
log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider)
G
On 06/21/2013 02:17 PM, Yves S. Garret wrote:
Hi, I have a question about breaking up really long lines of code in
Python.
I have the following line of code:
log.msg("Item wrote to MongoDB database %s/%s"
%(settings['MONGODB_DB'], settings['MONGODB_COLLECTION']),
level=log.DEBUG, spider=spide
On Fri, Jun 21, 2013 at 5:48 PM, Ray Cote
wrote:
>
> --
>
> *From: *"Yves S. Garret"
> *To: *python-list@python.org
> *Sent: *Friday, June 21, 2013 5:17:28 PM
> *Subject: *n00b question on spacing
>
>
> Hi, I have a question about breaking up really long lines of code
- Original Message -
> From: "Yves S. Garret"
> To: python-list@python.org
> Sent: Friday, June 21, 2013 5:17:28 PM
> Subject: n00b question on spacing
> Hi, I have a question about breaking up really long lines of code in
> Python.
> I have the following line of code:
> log.msg("Item w
In "Yves S. Garret"
writes:
> Hi, I have a question about breaking up really long lines of code in Python.
> I have the following line of code:
> log.msg("Item wrote to MongoDB database %s/%s" %(settings['MONGODB_DB'],
> settings['MONGODB_COLLECTION']), level=log.DEBUG, spider=spider)
> Given
43 matches
Mail list logo