On Thu, Feb 5, 2015 at 6:27 AM, Anssi Saari wrote:
> What I find surprising is that so many people cling so hard to their
> localized keyboard layouts. I think none of those were created by
> engineers and should be avoided by technical people. Or, in fact,
> everyone. Even Microsoft seems to unde
Steven D'Aprano writes:
> Vito De Tullio wrote:
>
>> Steven D'Aprano wrote:
>>
This just does not roll of the fingers well. Too many “reach for
modifier keys” in a row.
>>>
>>> *One* modifier key in a row is too many?
>>>
>>> s o m e SHIFT D o c [ ' SHIFT _ i d ' ]
>>
>> I'm not OP,
Vito De Tullio wrote:
> Steven D'Aprano wrote:
>
>>> This just does not roll of the fingers well. Too many “reach for
>>> modifier keys” in a row.
>>
>> *One* modifier key in a row is too many?
>>
>> s o m e SHIFT D o c [ ' SHIFT _ i d ' ]
>
> I'm not OP, but as side note... not everyone has "
Steven D'Aprano wrote:
>> This just does not roll of the fingers well. Too many “reach for modifier
>> keys” in a row.
>
> *One* modifier key in a row is too many?
>
> s o m e SHIFT D o c [ ' SHIFT _ i d ' ]
I'm not OP, but as side note... not everyone has "[" as a direct character
on the keyb
Ian Kelly wrote:
>> Extending this to wrap methods of classes is also left as an exercise.
>> (Hint: don't subclass. Search the ActiveState Python recipes for
>> "automatic delegation" by Alex Martelli.)
>
> Do you mean this one?
>
> http://code.activestate.com/recipes/52295-automatic-delegation
On Wed, Feb 4, 2015 at 3:38 PM, Steven D'Aprano
wrote:
> Travis Griggs wrote:
>> This just does not roll of the fingers well. Too many “reach for modifier
>> keys” in a row.
>
> *One* modifier key in a row is too many?
>
> s o m e SHIFT D o c [ ' SHIFT _ i d ' ]
I think the point was meant to be
Travis Griggs wrote:
> I really like pymongo. And I really like Python. But one thing my fingers
> really get tired of typing is
>
> someDoc[‘_’id’]
I've never used pymongo, so can't comment from experience, but surely any
library which encourages, if not requires, that you access private data _
On Wed, 04 Feb 2015 13:54:22 -0700, Ian Kelly wrote:
> I'd prefer map (or itertools.imap in Python 2) over the inline generator
> in this case:
>
> for doc in map(Doc, client.db.radios.find({’_id': {’$regex’:
> ‘^[ABC]'}})):
> pprint(doc)
>
> Or if you like, a utility function wrapping the s
On Wed, Feb 4, 2015 at 1:16 PM, Travis Griggs wrote:
> Yes, that is clever. So if you wanted to minimize the amount of typing you
> had to do at all of your pymongo API call sites, what strategy would you use
> to keep that relatively terse?
>
> Is the following the right approach to take?
>
> c
On Wed, Feb 4, 2015 at 1:16 PM, Travis Griggs wrote:
> Yes, that is clever. So if you wanted to minimize the amount of typing you
> had to do at all of your pymongo API call sites, what strategy would you use
> to keep that relatively terse?
>
> Is the following the right approach to take?
>
> c
Travis Griggs wrote:
for doc in client.db.radios.find({’_id': {’$regex’: ‘^[ABC]'}}): pprint(doc)
changes to
for doc in ((Doc(d) for d in client.db.radios.find({’_id': {’$regex’:
‘^[ABC]'}})): pprint(doc)
Are there other approaches? Feel free to impress me with evil abuses in the
interest of a
On Wed, Feb 4, 2015 at 12:16 PM, Travis Griggs wrote:
>
>> On Feb 4, 2015, at 9:22 AM, Ian Kelly wrote:
>>
>> On Wed, Feb 4, 2015 at 9:50 AM, Travis Griggs wrote:
>>> I really like pymongo. And I really like Python. But one thing my fingers
>>> really get tired of typing is
>>>
>>> someDoc[‘_’i
> On Feb 4, 2015, at 9:22 AM, Ian Kelly wrote:
>
> On Wed, Feb 4, 2015 at 9:50 AM, Travis Griggs wrote:
>> I really like pymongo. And I really like Python. But one thing my fingers
>> really get tired of typing is
>>
>> someDoc[‘_’id’]
>>
>> This just does not roll of the fingers well. Too m
On Wed, Feb 4, 2015 at 9:50 AM, Travis Griggs wrote:
> I really like pymongo. And I really like Python. But one thing my fingers
> really get tired of typing is
>
> someDoc[‘_’id’]
>
> This just does not roll of the fingers well. Too many “reach for modifier
> keys” in a row. I would rather use
I really like pymongo. And I really like Python. But one thing my fingers
really get tired of typing is
someDoc[‘_’id’]
This just does not roll of the fingers well. Too many “reach for modifier keys”
in a row. I would rather use
someDoc._id
Googling shows that I’m not the first to want to do
15 matches
Mail list logo