Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #57001
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mohsen@pahlevanzadeh.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.015 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'important,': 0.07; 'suppose': 0.07; 'string': 0.09; 'val': 0.09; 'attribute,': 0.16; 'dict': 0.16; 'fetch': 0.16; 'subject:python': 0.16; 'all,': 0.19; 'code,': 0.22; 'replace': 0.24; 'question': 0.24; 'code:': 0.26; "can't": 0.35; 'but': 0.35; 'yours,': 0.36; 'skip:m 40': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'according': 0.40; 'dear': 0.65; 'dic': 0.84; 'dict()': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pahlevanzadeh.org; s=default; h=Content-Transfer-Encoding:Mime-Version:Content-Type:Date:To:From:Subject:Message-ID; bh=ks2vMCmT8Z53YgB4cAD2+WIQ+OS23vHWMR+zJ8rFkg8=; b=Gkad52so2vZjcbejzypP/p7euKKow4xawKOD9VdYFKdYhI6lurSKNiopKTZbYvBL0HyuSkXe9qqxxgqyS57evFrQOr989OxmTLzdlWljDXSV+FexNFGlP+eDXxgYdqPq6mKuDaI6jwXqaAUz2KvdjAHGP1gjrdurTa74YLNpIQs=; |
| Subject | pointer and python |
| From | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
| To | python-list@python.org |
| Date | Fri, 18 Oct 2013 02:47:39 +0330 |
| Content-Type | text/plain; charset="UTF-8" |
| X-Mailer | Evolution 3.8.5-2 |
| Mime-Version | 1.0 |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - part7.royal-servers.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - pahlevanzadeh.org |
| X-Get-Message-Sender-Via | part7.royal-servers.com: authenticated_id: mohsen@pahlevanzadeh.org |
| 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.1187.1382051885.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1382051885 news.xs4all.nl 15906 [2001:888:2000:d::a6]:58970 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:57001 |
Show key headers only | View raw
Dear all,
Suppose I have the following code:
##########################################3
mydic = dict()
mydict.update({'string':QtGui.QCheckBox()}) ## suppose this dic has many
value with some string and QCheckBox Object
#####Then i have itreate it :
for key, val in mydict.items():
setattr(self,"%s" % val,XXX) ###===> this line is the given line
getattr(self,"%s" % val)
############################################33
According to the above code, i fetch a set of object from dict and set
them as attribute, But question is , val has value and it's important,
and i can't replace any other value with it, What i replace with XXX in
setattr ?
Yours,
Mohsen
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
pointer and python Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-10-18 02:47 +0330
csiph-web