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


Groups > comp.lang.python > #30032

Re: python file API

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: python file API
Date 2012-09-25 08:27 +0100
References (1 earlier) <5060D55C.3000407@davea.name> <mailman.1222.1348524844.27098.python-list@python.org> <a8dc1fb1-b5ff-46fe-8486-91fdc2ad91de@googlegroups.com> <CAHVvXxQa08bFVJ10x75jeRYxDw4J3xPyvRauqP5haq=ppV6DKQ@mail.gmail.com> <CAMjeLr_bjbG3GA5RWux5nuz9LNeX93Eh7RLvg5i9mBsdWU8YOw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1286.1348558028.27098.python-list@python.org> (permalink)

Show all headers | View raw


On 25/09/2012 03:32, Mark Adam wrote:
> On Mon, Sep 24, 2012 at 5:55 PM, Oscar Benjamin
> <oscar.j.benjamin@gmail.com> wrote:
>> There are many situations where a little bit of attribute access magic is a
>> good thing. However, operations that involve the underlying OS and that are
>> prone to raising exceptions even in bug free code should not be performed
>> implicitly like this. I find the following a little cryptic:
>> try:
>>      f.pos = 256
>> except IOError:
>>      print('Unseekable file')
>
> Well it might be that the coupling between the python interpreter and
> the operating system should be more direct and there should be a
> special exception class that bypasses the normal overhead in the
> CPython implementation so that error can be caught in the code without
> breaking syntax.  But I don't think I'm ready to argue that point....
>
> markj
>

Something along these lines 
http://docs.python.org/dev/whatsnew/3.3.html#pep-3151-reworking-the-os-and-io-exception-hierarchy 
?

-- 
Cheers.

Mark Lawrence.

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


Thread

python file API zipher <dreamingforward@gmail.com> - 2012-09-24 14:35 -0700
  Re: python file API Dave Angel <d@davea.name> - 2012-09-24 17:49 -0400
    Re: python file API Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2012-09-25 08:22 +0200
      Re: python file API Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 04:19 -0400
        Re: python file API Grant Edwards <invalid@invalid.invalid> - 2012-09-25 14:07 +0000
      Re: python file API Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 12:07 -0400
      Re: python file API Chris Angelico <rosuav@gmail.com> - 2012-09-26 02:12 +1000
  Re: python file API Chris Kaynor <ckaynor@zindagigames.com> - 2012-09-24 14:58 -0700
  Re: python file API Chris Angelico <rosuav@gmail.com> - 2012-09-25 08:14 +1000
    Re: python file API zipher <dreamingforward@gmail.com> - 2012-09-24 15:36 -0700
      Re: python file API Mark Adam <dreamingforward@gmail.com> - 2012-09-24 21:32 -0500
      Re: python file API Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 08:27 +0100
      Re: python file API Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 11:51 +0100
    Re: python file API zipher <dreamingforward@gmail.com> - 2012-09-24 15:36 -0700
      Re: python file API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 02:28 +0000
        Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 07:25 +0200
          Re: python file API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 07:28 +0000
            Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 21:40 +0200
    Re: python file API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-25 01:33 +0000
  Re: python file API Dave Angel <d@davea.name> - 2012-09-24 18:36 -0400
  Re: python file API Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-24 16:37 -0600
    Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 07:32 +0200
      Re: python file API Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-25 04:13 -0400
        Re: python file API Thomas Rachel <nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915@spamschutz.glglgl.de> - 2012-09-25 11:53 +0200
      Re: python file API Ian Kelly <ian.g.kelly@gmail.com> - 2012-09-25 03:32 -0600
  Re: python file API Chris Angelico <rosuav@gmail.com> - 2012-09-25 08:57 +1000
  Re: python file API Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-09-25 00:12 +0100
  Re: python file API Chris Kaynor <ckaynor@zindagigames.com> - 2012-09-24 16:14 -0700
  Re: python file API Ramchandra Apte <maniandram01@gmail.com> - 2012-09-30 05:50 -0700

csiph-web