Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40368
| 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 | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.021 |
| X-Spam-Evidence | '*H*': 0.96; '*S*': 0.00; 'filename': 0.07; 'shutil': 0.07; 'terry': 0.09; 'experiment.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'generate,': 0.16; 'reedy': 0.16; 'wrote:': 0.17; 'file.': 0.20; '"",': 0.22; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; '(most': 0.27; 'am,': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; '>>>>': 0.29; "skip:' 10": 0.30; 'error': 0.30; 'file': 0.32; 'traceback': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'too.': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; "didn't": 0.36; 'subject:with': 0.36; 'bad': 0.37; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'skip:o 20': 0.38; 'description': 0.39; 'to:addr:python.org': 0.39; '2013': 0.84; 'directory:': 0.84; 'technique': 0.93 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=TVPUNmZxpjU5APbHs9oeoFsAq6b8tCqIT2YUXFuPdyI=; b=Fi2bX1gU4iM3BJ9CRJz+bOKoVp5xp5f1+aCsLW/jPfsJLkmfodvBSYMe2mHGLXzqiR JFuy5vzwOPsIoRW3OlmKDVECgUuMpwzex6ja427LrjoOLeXCqzB8WdU0dyBCfxd0cEWT WNgoez5rnFHD6vOpcPvd3ElhCFd1MpSezpjNoClxK+/0qvg/4LSeIzp86+SM91S0YTTi x4OuSC5raF5NwrK2l7zvFbZJ/pCUrWjyC/gG8NqmZvOfUiC/13mCfyQTmx2RMcPmVP/8 9mtEzv1XvxnPeq+AirTUT/yUfqZMwtHyd9shQxaJqnBDpG1MVx6e+pElCJu/1KXwggiA s3iw== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.67.164 with SMTP id o4mr5046379vdt.42.1362262611189; Sat, 02 Mar 2013 14:16:51 -0800 (PST) |
| In-Reply-To | <kgtql2$s0p$1@ger.gmane.org> |
| References | <707df78f-9a67-4ce1-8dd3-095c75a7f7da@googlegroups.com> <kgtql2$s0p$1@ger.gmane.org> |
| Date | Sun, 3 Mar 2013 09:16:51 +1100 |
| Subject | Re: Dealing with exceptions |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.2798.1362262619.2939.python-list@python.org> (permalink) |
| Lines | 18 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1362262619 news.xs4all.nl 6894 [2001:888:2000:d::a6]:35674 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:40368 |
Show key headers only | View raw
On Sun, Mar 3, 2013 at 8:23 AM, Terry Reedy <tjreedy@udel.edu> wrote:
>>>> open('sdjhfjshdfkjsh')
> Traceback (most recent call last):
> File "<pyshell#2>", line 1, in <module>
> open('sdjhfjshdfkjsh')
> FileNotFoundError: [Errno 2] No such file or directory: 'sdjhfjshdfkjsh'
>
> Now, does shutil pass on FileNotFoundError? I will let you experiment.
>
> There are error conditions that are hard to generate, but a bad file name is
> not one of them.
That's actually a perfectly valid file name, but one that doesn't
happen to have a corresponding file. However, the same technique will
work with the OP's description of "a filename which the FAT32 didn't
like" too.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Dealing with exceptions bvdp <bob@mellowood.ca> - 2013-03-02 09:40 -0800
Re: Dealing with exceptions Kwpolska <kwpolska@gmail.com> - 2013-03-02 18:52 +0100
Re: Dealing with exceptions bvdp <bob@mellowood.ca> - 2013-03-02 11:35 -0800
Re: Dealing with exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-03 01:41 +0000
Re: Dealing with exceptions bvdp <bob@mellowood.ca> - 2013-03-02 11:35 -0800
Re: Dealing with exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-03-03 00:41 +0000
Re: Dealing with exceptions Chris Angelico <rosuav@gmail.com> - 2013-03-03 12:04 +1100
Re: Dealing with exceptions Nobody <nobody@nowhere.com> - 2013-03-03 23:01 +0000
Re: Dealing with exceptions Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-02 10:58 -0700
Re: Dealing with exceptions Ian Kelly <ian.g.kelly@gmail.com> - 2013-03-02 11:00 -0700
Re: Dealing with exceptions Chris Angelico <rosuav@gmail.com> - 2013-03-03 05:21 +1100
Re: Dealing with exceptions bvdp <bob@mellowood.ca> - 2013-03-02 11:39 -0800
Re: Dealing with exceptions bvdp <bob@mellowood.ca> - 2013-03-02 11:39 -0800
Re: Dealing with exceptions Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-03-02 19:18 +0000
Re: Dealing with exceptions Devin Jeanpierre <jeanpierreda@gmail.com> - 2013-03-02 14:27 -0500
Re: Dealing with exceptions Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-02 11:43 -0800
Re: Dealing with exceptions Terry Reedy <tjreedy@udel.edu> - 2013-03-02 16:23 -0500
Re: Dealing with exceptions Chris Angelico <rosuav@gmail.com> - 2013-03-03 09:16 +1100
Re: Dealing with exceptions Terry Reedy <tjreedy@udel.edu> - 2013-03-02 18:08 -0500
Re: Dealing with exceptions Chris Angelico <rosuav@gmail.com> - 2013-03-03 10:17 +1100
csiph-web