Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Reason for not allowing import twice but allowing reload() Date: Wed, 2 Mar 2016 11:13:23 +1100 Lines: 31 Message-ID: References: <645cdd46-d4a4-49b3-a0d8-848608d70d73@googlegroups.com> <56d57aa4$0$1586$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de i6BLcPfPzBu+/ORcg3fV7QqjrI5f+v/PXvSHCX3rpqJg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'important,': 0.07; 'cc:addr:python-list': 0.09; 'leaks': 0.09; 'oh,': 0.09; 'subject:()': 0.09; 'weeks,': 0.09; 'yeah,': 0.09; 'subject:not': 0.11; 'wed,': 0.15; 'server,': 0.15; '2016': 0.16; 'cc:name:python': 0.16; 'downtime': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:import': 0.16; 'sure.': 0.16; 'wrote:': 0.16; 'memory': 0.17; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'do.': 0.22; 'meant': 0.22; 'year,': 0.22; 'basis,': 0.22; 'gather': 0.22; 'am,': 0.23; 'minutes.': 0.23; "haven't": 0.24; 'patch': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; "i've": 0.25; 'message-id:@mail.gmail.com': 0.27; '(although': 0.29; 'periodic': 0.29; 'restart': 0.29; 'reset': 0.29; 'certainly': 0.30; "i'd": 0.31; 'up.': 0.32; 'though,': 0.32; 'though.': 0.33; 'similar': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'done': 0.35; 'clear': 0.35; 'important.': 0.35; 'something': 0.35; 'problem.': 0.35; 'but': 0.36; 'received:209.85': 0.36; '(and': 0.36; 'subject:: ': 0.37; 'being': 0.37; 'received:209.85.213': 0.37; 'difference': 0.38; 'received:209': 0.38; 'turned': 0.38; 'rather': 0.39; 'save': 0.60; 'your': 0.60; 'caused': 0.61; 'real': 0.62; 'back': 0.62; 'relatively': 0.63; 'within': 0.64; 'balance': 0.64; 'week,': 0.64; 'between': 0.65; 'mar': 0.65; 'hour': 0.69; 'online': 0.71; 'book.': 0.72; 'shortly': 0.72; 'gathering': 0.76; 'low': 0.83; 'chrisa': 0.84; 'traffic.': 0.84; 'unacceptable': 0.84; 'updates,': 0.84; 'uptime': 0.84; 'absolutely': 0.88; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=/Hg5LUgxOlVy8gdoyYsdT7TY7E3gb2Zh/kKy58OQsP0=; b=paZqDfyEtUBr1/VudeEhjrdMojXQnHKG4ZWqN+oRBwZLIh0JRg8MQpIGLR6Xu5cb2b hoQ+r15xlqLt7S012AjMXeESbDk3nrsFuWPLbtLwAqC799NVX3bP9YNVC0O12EvvfWFm o3ecaRiBrYsQu2JwQK0DdmNXj/bIDwIl06lWfkQaT3QZBAn9EHrvuDempdFx4VeScKLm RXi3agCsrErDShaG5yFwVY8lkpuGn1vJDZC+MCTV9Bbo7zC0fAVEeZG8UO9RQvqPzJP+ MKcqzwmZYkLzdXVVXxQkDUp+0mpVH/7GVZHl+bwS/E5SgeVDRGENqNvdunfFVijWhH3Y 1Tpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:cc; bh=/Hg5LUgxOlVy8gdoyYsdT7TY7E3gb2Zh/kKy58OQsP0=; b=TYdFd2NO5G67igpOK74YrSRhOyhgmXJb67466Ze3CezWUB+/Ixp7aBhS8Ecck0ddVX kYwlNWwv21EupeL9nHtNDmOaOIE6PqhQWt6jqF6nkGlcjP53OKBrtoXOb9x0iXk0xslD ar/DsISzT/qZYXigmbAoIblT2y9qjobHckUPHlf2KMdTbAvy39fBV2mV3y9tVVr0wM9j 4FEdCgaqNcsrfvMgjfm0YPaZ49jWh++qxgvcwQRVPE+H6Jw7giY8JRJwTPFHnb7g5G7G nR7EAQ5TWL/oHbSxeQ82TfJFqo05AxLqSt2KKJA/CFyeIabwmbljOLv1+dP20ZWk7mfZ 7+iA== X-Gm-Message-State: AD7BkJLZUgyQ5PEKvm/3wmKz/nxvzk/e+25dk4vZl8zP9zGdP3h+ZUhu9RFLNVoy3BPalX5RP4VamhdAieQl7A== X-Received: by 10.50.180.35 with SMTP id dl3mr1927565igc.94.1456877603778; Tue, 01 Mar 2016 16:13:23 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:103826 On Wed, Mar 2, 2016 at 9:29 AM, Ian Kelly wrote: > I certainly understand the value of being able to work on a mudlib > without having to restart the mud. There's a big difference between > that and clocking a year of uptime just because you can, though. Oh, sure. I mentioned the year because I have done that once or twice, but it's the week, rather than the year, that's truly important. If something came up that meant I absolutely had to reset everything on a six-monthly basis, no big deal (although I'd rather not have a reset every month). > The MUD that I used to play had scheduled restarts every 2-4 weeks, > not to perform updates, but just to restart the process and clear out > memory leaks. This never caused any real problem. You knew that it was > coming because it was announced, and you took a break for a couple of > minutes. If you were AFK, then your auto-login script reconnected you > within shortly after the MUD came back up. Yeah, and I play one that has semi-scheduled restarts about every 6-10 weeks, for similar reasons (and also for game balance reasons; they deliberately don't save gear across restarts, so people have to gather new gear). I haven't had issues with memory leaks on my server, but it's relatively low traffic. Again, though, if it turned out (under heavier load) that periodic restarts were important, I could design around that requirement, but there's no way I could design around a model of "weekly downtime as the only way to change anything", the way games like Magic: The Gathering Online do. I've once seen them have to do an emergency out-of-band patch - and it took them an hour or something of outage to do it. Unacceptable in my book. ChrisA