Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'table.': 0.07; 'definition,': 0.09; 'integers': 0.09; 'cc:addr:python-list': 0.11; 'cc:name:python list': 0.16; 'descriptor': 0.16; 'descriptor.': 0.16; 'hardware.': 0.16; 'integer.': 0.16; 'numbered': 0.16; 'cc:addr:python.org': 0.22; 'entries': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'cc:2**2': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'piece': 0.31; 'steven': 0.31; 'file': 0.32; 'actual': 0.34; 'table': 0.34; '"the': 0.34; 'created': 0.35; 'no,': 0.35; 'objects': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'example,': 0.37; 'starting': 0.37; 'files': 0.38; 'does': 0.39; 'either': 0.39; 'simply': 0.61; "you've": 0.63; 'subject:skip:o 10': 0.84; 'reside': 0.91; 'acknowledge': 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:cc:content-type; bh=AYUF2dmFFx35xlHZrA2h+WXDlPrnY1RXIt1BeE9pG80=; b=oqicp0QS/uJ9cgKFOpN4Zp3X/nD+el/URwnPSYEwg1UiDmB8c8/z/m4qFL9E0RqLeF nIMzSNEyJTt27r6/TWAvFGofPxaFnJ+wbjb0TBMU7fSFfC+OjjBSzUAp3IaLmrv2zh6b IyvMSF7V3uhXWtgWbWmAVRIFonE470V2FcV0YRlq2zWhJidm0KAqO+D6WB4nyQxZXN8G tnhLLjWphC0W8MzjLvUPkiwC/I+lGj1ejLEZgdlqLDXupXNuLdEkl5457g3PK/+Dx4aa SNjKa++hcHMdc8/oKbvcCc6VuylHYeuJ6J/U1++Pb8r3kWPNbeYYLowzLx/m6t9Ilfwk iEeg== MIME-Version: 1.0 X-Received: by 10.194.61.237 with SMTP id t13mr28395194wjr.2.1368242171901; Fri, 10 May 2013 20:16:11 -0700 (PDT) In-Reply-To: <20130510222541.GA82778@cskk.homeip.net> References: <20130510222541.GA82778@cskk.homeip.net> Date: Fri, 10 May 2013 20:16:11 -0700 Subject: Re: object.enable() anti-pattern From: Mark Janssen To: Cameron Simpson Content-Type: text/plain; charset=ISO-8859-1 Cc: Python List , Roy Smith , steve+comp.lang.python@pearwood.info X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1368242179 news.xs4all.nl 15864 [2001:888:2000:d::a6]:51914 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45124 > | No, I've created a file descriptor, which is, by definition, an integer. > | It has nothing to do with C. This is all defined by the POSIX > | interface. For example, the getdtablesize(2) man page says: > | > | "The entries in the descriptor table are numbered with small integers > | starting at 0. The call getdtablesize() returns the size of this table." > [... snip ...] > > I'm with Steven here. > > You've made a number that can be used with calls that access the > OS file descriptor table. But it isn't a file descriptor. (Yes, the > in-program number is just a number either way.) Steven, don't be misled. POSIX is not the model to look to -- it does not acknowledge that files are actual objects that reside on a piece of hardware. It is not simply an integer. Mark