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


Groups > comp.lang.python > #99659

Re: Looking for ideas to improve library API

Path csiph.com!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From Devin Jeanpierre <jeanpierreda@gmail.com>
Newsgroups comp.lang.python
Subject Re: Looking for ideas to improve library API
Date Sat, 28 Nov 2015 03:31:14 -0800
Lines 17
Message-ID <mailman.186.1448710315.20593.python-list@python.org> (permalink)
References <CABMb9Gu+m9cJXQavXwxc0iouhsKsFSFKVvepLXhJcorc8aUkRw@mail.gmail.com> <CABicbJJkNCTW6PAWw_P5mQmHAwysJaG49N8C+zLV9vKQkWB8_Q@mail.gmail.com> <CABMb9GtR_WVngUUmNAVP83vXJbUZK40REfUBeBpCn3XL2YFaPw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
X-Trace news.uni-berlin.de 9xKPo8kNLQYNFGeZebtNXA8FhXkEIhTliNNiG4v9XDqw==
Return-Path <jeanpierreda@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'api': 0.09; 'cc:addr :python-list': 0.09; 'subject:library': 0.09; 'yeah,': 0.09; 'thu,': 0.15; '(other': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:ideas': 0.16; 'wrote:': 0.16; 'ownership': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'do.': 0.22; 'am,': 0.23; 'thanks,': 0.24; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'chris': 0.26; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; 'object,': 0.27; 'file': 0.34; 'received:google.com': 0.35; 'nov': 0.35; 'requiring': 0.35; 'received:74.125.82': 0.35; 'but': 0.36; 'should': 0.36; 'instead': 0.36; 'subject:: ': 0.37; 'why': 0.39; '26,': 0.72; 'subject:improve': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=JA1dx3lDlxs71ZljkyNUv+Hpj4EDOdjx8bJUNzHXqI8=; b=XIM3KqjYiVljR1W+S3kVRYrTA88EL8SLtztT8wplMrDjcViJTn35AGUjsMGjzkBgx8 2Bos4jWir9u0VaRBSGpCYCg13A7J1rampB/BUGcRP4BxmSV3g391mjmML5yK+7uPGeMX ODvPVkcAWgI/7pklJxxqXwJAsHyVC3edn3cgn7zoqgr8oGWHAINJswpMTWKQA7l3Z+Hg aWDOfUxsVd6L4cE7KBQI+fNw5Ttmq9ia6VwbKfQHjXqCmdy0ZNuzDFmnaE0sh70wEjAF sLyUIMPhVPuSCuKPo4THO63Hq8P1Zp7AaIzzvTA+F406RZI+rJ0HdkdGaccCPYseNxMv owkw==
X-Received by 10.28.33.136 with SMTP id h130mr17412423wmh.93.1448710313501; Sat, 28 Nov 2015 03:31:53 -0800 (PST)
In-Reply-To <CABMb9GtR_WVngUUmNAVP83vXJbUZK40REfUBeBpCn3XL2YFaPw@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:99659

Show key headers only | View raw


Documentation is all you can do.

-- Devin

On Thu, Nov 26, 2015 at 5:35 AM, Chris Lalancette <clalancette@gmail.com> wrote:
> On Thu, Nov 26, 2015 at 7:46 AM, Devin Jeanpierre
> <jeanpierreda@gmail.com> wrote:
>> Why not take ownership of the file object, instead of requiring users
>> to manage lifetimes?
>
> Yeah, I've kind of been coming to this conclusion.  So my question
> then becomes: how do I "take ownership" of it?  I already keep a
> reference to it, but how would I signal to the API user that they
> should no longer use that file object (other than documentation)?
>
> Thanks,
> Chris

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


Thread

Re: Looking for ideas to improve library API Devin Jeanpierre <jeanpierreda@gmail.com> - 2015-11-28 03:31 -0800

csiph-web