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


Groups > comp.lang.python > #43503

Re: Functional vs. Object oriented API

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!border1.hitnews.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!194.134.4.91.MISMATCH!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dihedral88888@googlemail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'patterns': 0.04; 'executed': 0.09; 'part,': 0.09; 'to:addr:comp.lang.python': 0.09; 'wrapped': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'roy': 0.16; 'screen,': 0.16; 'subject:API': 0.16; 'subject:Object': 0.16; 'subject:oriented': 0.16; 'written.': 0.16; 'do.': 0.18; 'coding': 0.22; 'cc:addr:python.org': 0.22; 'header:User-Agent:1': 0.23; 'skip:l 30': 0.24; 'helpful': 0.24; 'initial': 0.24; 'java': 0.24; 'looks': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply- To:1': 0.27; 'properties': 0.29; 'code': 0.31; 'hacker': 0.31; 'lot.': 0.31; 'class': 0.32; 'probably': 0.32; 'run': 0.32; 'maybe': 0.34; 'could': 0.34; 'received:209.85': 0.35; 'convert': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'bought': 0.36; 'data,': 0.36; 'done,': 0.36; 'much.': 0.36; 'too': 0.37; 'level': 0.37; 'received:209': 0.37; 'problems': 0.38; 'from:addr:googlemail.com': 0.38; 'somebody': 0.38; 'does': 0.39; 'even': 0.60; 'interview': 0.61; 'matter': 0.61; "you're": 0.61; 'our': 0.64; 'levels': 0.65; 'subject:. ': 0.67; 'smith': 0.68; 'yourself': 0.78; 'applicants': 0.83; 'low': 0.83; 'now...': 0.84; '8bit%:70': 0.91
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:path:newsgroups:date:in-reply-to:complaints-to :injection-info:nntp-posting-host:references:user-agent :x-google-web-client:x-google-ip:mime-version:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=RZSlATP7Om+wpJEPtq4nB7/Uhv7r4uGkRyPe2TLwvvU=; b=o7pUuYC4gSiaSD3K7eInaSbxzhS8EyKJmhVezM8xkgUFB6YDRyNCfrQIMBvjQ20QH4 otfb0p86Eo6VGahxWaqHm5Qhe50jicAdYvPOXh5lnJ2ULb+L3FDeOiIQY/U1rkbfnMBM PMjSTFcqXAaKc0rSFxrT99mmjCpOh0iPs9txdEgVhuz3117Ksqp1eBza6vsb4cAAHxBl kh1ZAt6EeOi4PbOi/GwaCcEqzSYrHUDQcZ1XIIqL5Ho4dpnZAdXomF0j9aJsYh8j/EXa dOvCa9fCzm11FBiRxYlmIQG94wkGMuEDrv2y4rZzbLB/utU1Idx0AvEN7ZHD14EUQO4R eP9Q==
X-Received by 10.50.214.36 with SMTP id nx4mr126142igc.6.1365830731285; Fri, 12 Apr 2013 22:25:31 -0700 (PDT)
Newsgroups comp.lang.python
Date Fri, 12 Apr 2013 22:25:30 -0700 (PDT)
In-Reply-To <mailman.527.1365781666.3114.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=123.192.32.215; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw
References <mailman.429.1365635789.3114.python-list@python.org> <51678b94$0$29977$c3e8da3$5496439d@news.astraweb.com> <roy-E3B2B9.10194712042013@news.panix.com> <mailman.527.1365781666.3114.python-list@python.org>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 123.192.32.215
MIME-Version 1.0
Subject Re: Functional vs. Object oriented API
From 88888 Dihedral <dihedral88888@googlemail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
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>
Message-ID <mailman.546.1365830740.3114.python-list@python.org> (permalink)
Lines 57
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1365830740 news.xs4all.nl 2670 [2001:888:2000:d::a6]:45747
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43503

Show key headers only | View raw


David M Chess於 2013年4月12日星期五UTC+8下午11時37分28秒寫道:
> > Roy Smith <r...@panix.com>
> 
> 
> 
> 
> > As part of our initial interview screen, we give
> applicants some small 
> 
> > coding problems to do.  One of the things we see a lot is what
> you could 
> 
> > call "Java code smell".  This is our clue that the
> person is really a 
> 
> > Java hacker at heart who just dabbles in Python but isn't really fluent.
>  
> 
> > ...
> 
> > It's not just LongVerboseFunctionNamesInCamelCase().  Nor is
> it code 
> 
> > that looks like somebody bought the Gang of Four patterns book and
> is 
> 

> > that maybe there's a class struggling to be written.
> 
> 
> 
> And I think equally to the point, even if you have
> only data, or only functions, right now, if the thing in question has that
> thing-like feel to it :) you will probably find yourself with both before
> you're done, so you might as well make it a class now...
> 
> 
> 
> DC

If it is not time-critical and no needs to convert into 
CYTHON then it does not matter too much.

But a well wrapped class structures with good documents can 
help others to use the python codes a lot.

If the part is intended to be time-critical in the low level 
part, then  avoiding seeking 4 levels of methods and properties
inside a loop is helpful in python programs to be executed 
in the run time.


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


Thread

Functional vs. Object oriented API Max Bucknell <mpwb500@york.ac.uk> - 2013-04-11 00:16 +0100
  Re: Functional vs. Object oriented API Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-04-12 04:20 +0000
    Re: Functional vs. Object oriented API Roy Smith <roy@panix.com> - 2013-04-12 10:19 -0400
      Re: Functional vs. Object oriented API Mitya Sirenef <msirenef@lightbird.net> - 2013-04-12 10:29 -0400
      Re: Functional vs. Object oriented API David M Chess <chess@us.ibm.com> - 2013-04-12 11:37 -0400
        Re: Functional vs. Object oriented API 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-12 22:25 -0700
        Re: Functional vs. Object oriented API 88888 Dihedral <dihedral88888@googlemail.com> - 2013-04-12 22:25 -0700
  Re: Functional vs. Object oriented API Rui Maciel <rui.maciel@gmail.com> - 2013-04-13 09:51 +0100

csiph-web