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


Groups > comp.lang.python > #56921

Re: how to add object from dict

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.024
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'read.': 0.03; 'advice.': 0.09; 'pep': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'recommends': 0.09; 'deprecated.': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:object': 0.16; 'discussion': 0.18; 'header:User-Agent:1': 0.23; 'example.': 0.24; 'fine': 0.24; 'regardless': 0.24; 'right.': 0.26; 'header:X-Complaints-To:1': 0.27; 'related': 0.29; "doesn't": 0.30; 'code': 0.31; 'easier': 0.31; 'writes:': 0.31; 'style': 0.33; 'maybe': 0.34; 'subject:from': 0.34; 'but': 0.35; 'there': 0.35; 'chairman': 0.36; 'like,': 0.36; "i'll": 0.36; 'url:org': 0.36; 'ben': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'forum': 0.61; "you're": 0.61; 'you.': 0.62; 'complete': 0.62; 'such': 0.63; 'world': 0.66; 'market': 0.66; 'saw': 0.77; '\xe2\x80\x93': 0.77; 'ibm,': 0.84; 'short,': 0.84; 'subject:add': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Ben Finney <ben+python@benfinney.id.au>
Subject Re: how to add object from dict
Date Thu, 17 Oct 2013 11:50:26 +1100
References <1381961694.21908.13.camel@debian> <7wwqlcixup.fsf@benfinney.id.au> <1381968532.12853.4.camel@debian> <7wob6oiwgw.fsf@benfinney.id.au> <1381970241.12853.9.camel@debian>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Gmane-NNTP-Posting-Host rasputin.madmonks.org
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-gpg.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)
Cancel-Lock sha1:H8b1rDVs/7D5/0RJzi2T1VqIn5s=
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.1136.1381971037.18130.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1381971037 news.xs4all.nl 15999 [2001:888:2000:d::a6]:57172
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:56921

Show key headers only | View raw


Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> writes:

> You say right, but i don't any time to read all of content of
> http://sscce.org/ , But when i saw its description , i found out ,
> it's a set of law for good answer/question

That's right. Please take the time to help us to help you, by following
that advice.

> Also i saw PEP 8 , it's like old style C, and i like CamelCase.

TitleCaseNames are fine (PEP 8 recommends TitleCaseNames for classes),
camelCase is inconsistent and hence deprecated.

Regardless of what you like, if you're presenting code for others to
read – such as in a discussion forum where you'd like others to read
your code and help you – you are well advised to follow PEP 8 so your
code is easier for us to read.

> But now, all of my code doesn't work and related to the given
> traceback of i sent you.

I'll wait for your short, self-contained, complete example.

-- 
 \         “I think there is a world market for maybe five computers.” |
  `\                             —Thomas Watson, chairman of IBM, 1943 |
_o__)                                                                  |
Ben Finney

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


Thread

Re: how to add object from dict Ben Finney <ben+python@benfinney.id.au> - 2013-10-17 11:50 +1100

csiph-web