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


Groups > comp.lang.python > #95507

Re: Storing dictionary locations as a string and using eval - alternatives?

Path csiph.com!goblin1!goblin.stu.neva.ru!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!nzpost1.xs4all.net!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.020
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:string': 0.09; 'subject:using': 0.09; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'wrote:': 0.16; '(the': 0.22; 'module': 0.25; 'header:User-Agent:1': 0.26; 'header:X -Complaints-To:1': 0.26; 'instead': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'body': 0.61; 'potentially': 0.67; 'subject:alternatives': 0.84; 'victor': 0.84; 'mistake': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: Storing dictionary locations as a string and using eval - alternatives?
Date Thu, 20 Aug 2015 09:14:31 +0200
Organization None
References <edc848bb-a2aa-4396-8975-deaf887cbe60@googlegroups.com> <87r3myv6vu.fsf@handshake.de>
Mime-Version 1.0
Content-Type text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding 7Bit
X-Gmane-NNTP-Posting-Host p57bd81b4.dip0.t-ipconnect.de
User-Agent KNode/4.13.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.22.1440054883.28100.python-list@python.org> (permalink)
Lines 13
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1440054883 news.xs4all.nl 23845 [2001:888:2000:d::a6]:44933
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:95507

Show key headers only | View raw


dieter wrote:

> Victor Hooi <victorhooi@gmail.com> writes:
>> ...
> I did not read your message body - just your "subject".

That was a mistake ;)

> Instead of (the potentially insecure) "eval", I use "json.loads"
> (combined with a "json.dumps" to get the "json" representation).
> See the "json" module documentation.

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


Thread

Storing dictionary locations as a string and using eval - alternatives? Victor Hooi <victorhooi@gmail.com> - 2015-08-19 20:59 -0700
  Re: Storing dictionary locations as a string and using eval - alternatives? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-08-20 14:43 +1000
  Re: Storing dictionary locations as a string and using eval - alternatives? dieter <dieter@handshake.de> - 2015-08-20 07:57 +0200
  Re: Storing dictionary locations as a string and using eval - alternatives? Peter Otten <__peter__@web.de> - 2015-08-20 09:14 +0200

csiph-web