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


Groups > comp.lang.python > #85242

Re: pymongo and attribute dictionaries

Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.009
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'one?': 0.05; 'classes.': 0.09; 'url:activestate': 0.09; 'python': 0.11; '"automatic': 0.16; 'for,': 0.16; 'modifier': 0.16; 'new-style': 0.16; 'old-style': 0.16; 'recipe': 0.16; 'recipes': 0.16; 'subject:dictionaries': 0.16; 'travis': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'alex': 0.19; 'meant': 0.20; 'feb': 0.22; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'url:code': 0.29; 'message-id:@mail.gmail.com': 0.30; "d'aprano": 0.31; 'extending': 0.31; 'keys': 0.31; 'steven': 0.31; 'classes': 0.35; 'received:google.com': 0.35; 'should': 0.36; 'too': 0.37; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'times': 0.62; 'reached': 0.63; 'delegate': 0.68; '(hint:': 0.84; '2015': 0.84; 'exercise.': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=AxFUH7wuzAACOCWyAjmo0/1A4OtpVG8dXBrTvCqHFdg=; b=HMJjdr8aCv2c0NyAL6ZFNUSjsjDEG2hpMrSF/2Xca2isfg7uT3+KfXG5hpX2sERBAQ sALHpsdLyifAvnjUAcG5gHYMxPL0rjS91P29MaXJ4ifeRQax0jQMQh83J/LwqJCeU3Wp I42rdjKCk0xoaPqa7LaOZgpC3awmxH+1Z2sdlUxYPKxZeDYaZArrj+WAFfd2ZyiWnX6x /Kl+3XYNFB1W4V62mU7H3kFf2vu1mGIYJ4xocDeB6eKc/LJ2GDafDb3dJ+4T08sWbfjQ HLMK5UTnH4/MHuwbQ933zXbR7ePpUZATjjkn8eJdRHfzXHnkzldEt9d/qbiGZsmQoqZq Jb2A==
X-Received by 10.68.201.168 with SMTP id kb8mr1162039pbc.89.1423095619481; Wed, 04 Feb 2015 16:20:19 -0800 (PST)
MIME-Version 1.0
In-Reply-To <54d29f63$0$12986$c3e8da3$5496439d@news.astraweb.com>
References <mailman.18469.1423068652.18130.python-list@python.org> <54d29f63$0$12986$c3e8da3$5496439d@news.astraweb.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Wed, 4 Feb 2015 17:19:39 -0700
Subject Re: pymongo and attribute dictionaries
To Python <python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18481.1423099055.18130.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1423099055 news.xs4all.nl 2879 [2001:888:2000:d::a6]:51223
X-Complaints-To abuse@xs4all.nl
Path csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:85242

Show key headers only | View raw


On Wed, Feb 4, 2015 at 3:38 PM, Steven D'Aprano
<steve+comp.lang.python@pearwood.info> 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 the number of keys that need to be
reached for, not just the number of times Shift needs to be pressed.

> 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-as-an-alternative-to-inherita/

That's based on old-style classes. With new-style classes it fails to
delegate dunder methods like __str__. That recipe should be considered
obsolete.

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


Thread

pymongo and attribute dictionaries Travis Griggs <travisgriggs@gmail.com> - 2015-02-04 08:50 -0800
  Re: pymongo and attribute dictionaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-05 09:38 +1100
    Re: pymongo and attribute dictionaries Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-04 17:19 -0700
      Re: pymongo and attribute dictionaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-05 12:58 +1100
    Re: pymongo and attribute dictionaries Vito De Tullio <vito.detullio@gmail.com> - 2015-02-05 06:36 +0100
      Re: pymongo and attribute dictionaries Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-05 16:43 +1100
        Re: pymongo and attribute dictionaries Anssi Saari <as@sci.fi> - 2015-02-05 15:27 +0200
          Re: pymongo and attribute dictionaries Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-05 14:11 -0700

csiph-web