Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #42866
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <tyler@tysdomain.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; 'runtime': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; 'errors:': 0.16; 'from:addr:tyler': 0.16; 'from:addr:tysdomain.com': 0.16; 'from:name:littlefield, tyler': 0.16; 'message-id:@tysdomain.com': 0.16; "object's": 0.16; 'objects.': 0.16; 'rarely': 0.16; 'received:69.164': 0.16; 'received:69.164.206': 0.16; 'received:69.164.206.65': 0.16; 'received:tds-solutions.net': 0.16; 'subject:questions': 0.16; 'syntax,': 0.16; 'to:addr:pearwood.info': 0.16; 'to:addr:steve+comp.lang.python': 0.16; "to:name:steven d'aprano": 0.16; 'with?': 0.16; 'thanks,': 0.17; 'wrote:': 0.18; 'basically': 0.19; "python's": 0.19; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'header:User-Agent:1': 0.23; 'all:': 0.24; 'errors.': 0.24; 'tend': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'sort': 0.25; "i've": 0.25; 'handling': 0.26; 'header:In-Reply- To:1': 0.27; 'url:code': 0.29; "doesn't": 0.30; 'errors': 0.30; "i'm": 0.30; 'catching': 0.31; "d'aprano": 0.31; 'initialized': 0.31; 'pickle': 0.31; 'project:': 0.31; 'steven': 0.31; 'up.': 0.33; 'fri,': 0.33; 'skip:_ 10': 0.34; "i'd": 0.34; 'problem.': 0.35; 'objects': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'c++': 0.36; 'object,': 0.36; 'being': 0.38; 'pm,': 0.38; 'catch': 0.60; 'simple,': 0.60; 'helps': 0.61; 'url:p': 0.64; 'between': 0.67; 'useful.': 0.68; '2:30': 0.84; 'hardly': 0.84; 'light- weight': 0.84; 'modern,': 0.84; 'sometimes.': 0.84; 'care,': 0.91; '2013': 0.98 |
| Date | Fri, 05 Apr 2013 18:18:51 -0600 |
| From | "Littlefield, Tyler" <tyler@tysdomain.com> |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 |
| MIME-Version | 1.0 |
| To | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
| Subject | Re: a couple of questions: pickling objects and strict types |
| References | <mailman.159.1365188823.3114.python-list@python.org> <515f345a$0$29995$c3e8da3$5496439d@news.astraweb.com> |
| In-Reply-To | <515f345a$0$29995$c3e8da3$5496439d@news.astraweb.com> |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Cc | python-list@python.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 | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.170.1365207530.3114.python-list@python.org> (permalink) |
| Lines | 46 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1365207530 news.xs4all.nl 6923 [2001:888:2000:d::a6]:38670 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:42866 |
Show key headers only | View raw
On 4/5/2013 2:30 PM, Steven D'Aprano wrote:
> On Fri, 05 Apr 2013 12:59:04 -0600, Littlefield, Tyler wrote:
>
>> Hello all:
>> I've been using Python for a while now, but I have one larger problem. I
>> come from a c++ background; though it doesn't help in catching runtime
>> errors, being able to compile a program helps catch a lot of syntax
>> errors. I know about pychecker, which is somewhat useful. Do people have
>> other methods for handling this?
>
> Do you tend to make a lot of syntax errors?
Not a -lot-, but there are things I don't catch sometimes.
> Python also catches syntax errors at compile-time. I won't speak for
> others, but I hardly ever make syntax errors: between Python's simple,
> surprise-free syntax, and modern, syntax-colouring editors, I find that I
> rarely make syntax errors.
I am blind, so colorful editors don't really work all that well for me.
>> Also, I'm depickling objects. Is there a way I can force pickle to call
>> the object's ctor? I set up events per object, but when it just
>> deserializes it doesn't set all that up. Thanks,
> What's the object's ctor? What sort of objects are you dealing with?
>
>
>
def __init__(self):
self.events = {}
self.components = []
self.contents = []
self.uid = uuid4().int
self.events['OnLook'] = teventlet()
Basically events don't get initialized like I'd like after I depickle
objects.
--
Take care,
Ty
http://tds-solutions.net
The aspen project: a barebones light-weight mud engine:
http://code.google.com/p/aspenmud
He that will not reason is a bigot; he that cannot reason is a fool; he that dares not reason is a slave.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
a couple of questions: pickling objects and strict types "Littlefield, Tyler" <tyler@tysdomain.com> - 2013-04-05 12:59 -0600
Re: a couple of questions: pickling objects and strict types John Gordon <gordon@panix.com> - 2013-04-05 19:27 +0000
Re: a couple of questions: pickling objects and strict types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-05 20:30 +0000
Re: a couple of questions: pickling objects and strict types "Littlefield, Tyler" <tyler@tysdomain.com> - 2013-04-05 18:18 -0600
Re: a couple of questions: pickling objects and strict types Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-06 02:37 +0000
Re: a couple of questions: pickling objects and strict types Chris Angelico <rosuav@gmail.com> - 2013-04-06 13:49 +1100
Re: a couple of questions: pickling objects and strict types Dave Angel <davea@davea.name> - 2013-04-05 23:22 -0400
Re: a couple of questions: pickling objects and strict types mblume <foobar@invalid.invalid> - 2013-04-06 10:30 +0000
csiph-web