Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.027 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; '(self,': 0.07; '(instead': 0.09; '__init__': 0.09; 'kwargs': 0.09; 'syntax': 0.13; 'def': 0.13; 'instead.': 0.15; 'producing': 0.15; 'drag': 0.16; 'libraries?': 0.16; 'subject:object': 0.16; 'passing': 0.23; 'thanks,': 0.24; 'import': 0.24; 'plain': 0.24; 'module': 0.25; 'message-id:@mail.gmail.com': 0.27; '**kwargs):': 0.29; 'dictionary': 0.29; 'subject:/': 0.30; 'code': 0.30; "i'd": 0.31; 'knows': 0.32; 'anybody': 0.32; 'class': 0.33; 'curious': 0.33; 'subject:like': 0.33; 'similar': 0.33; 'except': 0.34; 'received:google.com': 0.35; 'functions.': 0.35; 'something': 0.35; 'but': 0.36; 'located': 0.36; 'data.': 0.36; 'to:addr :python-list': 0.36; 'client': 0.37; 'hi,': 0.38; 'data': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'side': 0.62; 'between': 0.65; 'overall': 0.72; '.....': 0.76; 'url:app': 0.84; 'glad': 0.87; 'subject:looking': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Zsk9HmRbwk60xhrEWLv1IFRwRaRRf/KhxAzkFjQ5PQY=; b=VXstSEDPj87f3i460QcSRERLQpdCvd1OBBTtqD2xoREsLdmRLkCei6QnbTY0Di5LLy 7xc4+WvY42ZtWCaCjAj6SfApd8qKc7v0SlmmwKXzW23MlwGCvYosQ8TKi9OQ8/D3QiKc FTjDdDSsdFhd8vvIQgfHrr9UPfd5USfXKutme//bVbTjQ4ZYssxoUxeDbMhhWnD7K+1l GTcgOq6CEDSsXx/t9PfRZzj3a4bF9YFRPBHQoYILp/tQmLVGd+dy4/9jHGjNYDSXOU6w NTDFrraQBNj07NQg6MfwQe6LKqlOBhbfWCrX7cN1dzZ975Tx5/NQukop9t2YhAGs6VRR 9PUQ== MIME-Version: 1.0 X-Received: by 10.68.252.225 with SMTP id zv1mr51215627pbc.45.1439263337015; Mon, 10 Aug 2015 20:22:17 -0700 (PDT) Date: Mon, 10 Aug 2015 23:22:16 -0400 Subject: looking for standard/builtin dict-like data object From: Vladimir Ignatov To: python-list@python.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1439263346 news.xs4all.nl 2855 [2001:888:2000:d::a6]:46230 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95239 Hi, In my code I often use my own home-brewed object for passing bunch of data between functions. Something like: class Data(object): def __init__ (self, **kwargs): self.__dict__ = kwargs .... return Data(attr1=..., attr2=..., attr3=...) Logically it works like plain dictionary but with nice result.attrX syntax on client side (instead of resut['attrX']). Overall I am pretty happy with this approach except that I need to drag Data class around my projects and import its module in every code producing data. I am curious if anybody knows similar "dummy" class located in standard libraries? I'd be glad to use it instead. Thanks, Vladimir https://itunes.apple.com/us/app/python-code-samples/id1025613117