Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.032 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'am,': 0.12; 'namespace.': 0.16; 'subject:classes': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'that?': 0.18; 'cc:no real name:2**0': 0.20; 'dec': 0.22; 'header:In-Reply-To:1': 0.22; 'wonder': 0.23; 'cc:2**0': 0.24; 'received:74.125.82.174': 0.24; 'import': 0.27; 'van': 0.28; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'class': 0.29; 'anyone': 0.31; 'fri,': 0.34; 'received:74.125.82': 0.35; 'received:74.125': 0.37; 'received:google.com': 0.37; 'easier': 0.38; 'help': 0.39; 'might': 0.40; '2011': 0.61; '30,': 0.74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qj1+vEQhnNJJN052jzmUUeRVrSIOqnmekxFnxGsJFhU=; b=xCDzfR+QzjQ1Yi7iIQhDdBsCu8ZSDqLe4qHid+BeOJBOoaRm9DcyvLqNt1T3s8r51r 2oK5Ap6DZbru1tFWSiNaEPQceI9pHoH9FGNtL4/A5jqEcxvNEnswSvliSzIvKiPvyfbz 7wW6GpIxJtLxHnk/7jdux+bG5ucIMDQ1pey+w= MIME-Version: 1.0 In-Reply-To: References: <2d221d0f-458e-4821-8786-f064b44b3125@p16g2000yqd.googlegroups.com> <208b4f8b-c347-44c6-ac9d-73662cc36dbd@o9g2000yqa.googlegroups.com> From: Ian Kelly Date: Fri, 30 Dec 2011 10:09:35 -0700 Subject: Re: pickling instances of metaclass generated classes To: lars van gemerden Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1325265008 news.xs4all.nl 6980 [2001:888:2000:d::a6]:52665 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18217 On Fri, Dec 30, 2011 at 9:51 AM, lars van gemerden wrote: > I still wonder whether it might be easier to add the class to the > namespace. Can anyone help me with that? from mypackage import mymodule setattr(mymodule, myclass.__name__, myclass)