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


Groups > comp.lang.python > #91485

Re: What is considered an "advanced" topic in Python?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!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.058
X-Spam-Evidence '*H*': 0.88; '*S*': 0.00; 'subject:Python': 0.05; 'mess': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'closures': 0.16; 'driscoll': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'magic': 0.16; 'wrote:': 0.16; 'exists': 0.18; 'pieces': 0.18; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'decorator': 0.22; 'fraction': 0.22; 'function,': 0.22; 'am,': 0.23; 'code,': 0.23; '2015': 0.23; 'sat,': 0.23; "i've": 0.24; 'seems': 0.24; 'header:In-Reply-To:1': 0.24; 'mike': 0.24; 'message-id:@mail.gmail.com': 0.28; 'actual': 0.29; 'decimal': 0.29; 'function': 0.30; 'becomes': 0.31; 'up.': 0.32; 'anyone': 0.32; 'realize': 0.32; 'int': 0.33; 'quickly': 0.34; 'subject:?': 0.34; 'received:google.com': 0.34; 'wrong': 0.35; 'something': 0.35; 'but': 0.36; 'subject:" ': 0.36; 'subject:: ': 0.37; 'takes': 0.39; 'data': 0.40; 'some': 0.40; 'even': 0.61; "you'll": 0.61; 'simple': 0.61; 'real': 0.61; '30,': 0.63; 'great': 0.64; 'between': 0.65; 'differences': 0.66; 'talking': 0.67; 'computers': 0.70; 'finally': 0.70; 'discover': 0.73; 'chrisa': 0.84; 'complex,': 0.84; 'float,': 0.84; 'to:none': 0.90; 'fun!': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=+iKXVDKYC66vovL1HPbOVmhNJdEvOFLLyuNmMe74lOQ=; b=e2jqvZvT9T0ySwHp3dAh5lfZGEEw/sD6XiRgHBTRUJI9pRK/Jt4zzEjoZWhGI5Hz8C 82Cf7SuOODmNGP8Jr/iTjIZgGpWbwgtJP0xPO9IHcbvILE1BTWt4+W9cf/CXexuQonwg leuM5CL8UosT1TIb4zmqy+A7fGQT5i4GZWsliUYy2Kby5nk34IUCucOIh8uJzY1Z643B QwYKAIT2pi6AGEuxZo/LrcyULq1LK+Ms6Ae8WI29PHuoSDW4XGNgZaWL/9dF+C8PXrlF nqEq2QO5aSAy9MYBzjwOzylDUiL81Xw1T8/BQqrIz7VQuo+8eyyALVl8u5J+to1j+eDW RtXA==
MIME-Version 1.0
X-Received by 10.42.154.65 with SMTP id p1mr2483869icw.26.1432919301834; Fri, 29 May 2015 10:08:21 -0700 (PDT)
In-Reply-To <28cec7df-0f51-4098-b027-72e913a9b656@googlegroups.com>
References <c03de3a7-3429-44a3-8241-5a7d81b9aefc@googlegroups.com> <mailman.192.1432915802.5151.python-list@python.org> <28cec7df-0f51-4098-b027-72e913a9b656@googlegroups.com>
Date Sat, 30 May 2015 03:08:21 +1000
Subject Re: What is considered an "advanced" topic in Python?
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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>
Newsgroups comp.lang.python
Message-ID <mailman.201.1432919309.5151.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1432919309 news.xs4all.nl 2839 [2001:888:2000:d::a6]:45360
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:91485

Show key headers only | View raw


On Sat, May 30, 2015 at 2:57 AM, Mike Driscoll <kyosohma@gmail.com> wrote:
>>
>> Good fun! A few ideas:
>>
>> How to write decorators, particularly those that take parameters.
>
> Yes, this one always seems to trip people up.

It's like a Sherlock Holmes pronouncement. When you see something like
Flask's app.route(), or functools.wraps(), it's pure magic and
completely incomprehensible. But break it down into little pieces (a
function that takes a function and returns a function, then decorator
syntax, then closures and the ability to call the original, and
finally a decorator factory function, which is what a parameterized
decorator is), and it becomes elementary.

>> The differences between the various number types (int, float, complex,
>> Fraction, Decimal) and when you'd want each one.
>
> I hadn't considered this one

It's not often an actual *problem* - I've never seen anyone pick the
wrong data type and mess up their code, not in Python - but it's a
great way to explore some of the differences between real numbers and
what computers work with. Also, I like talking about Fraction and
Decimal for the simple reason that they're unobvious; you can poke
around with Python and discover int and float, and if ever you need
imaginary/complex numbers, you'll quickly come across complex, but you
might use Python for years and not realize that decimal.Decimal even
exists - nor when you'd want it.

ChrisA

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


Thread

What is considered an "advanced" topic in Python? Mike Driscoll <kyosohma@gmail.com> - 2015-05-29 09:01 -0700
  Re: What is considered an "advanced" topic in Python? Joel Goldstick <joel.goldstick@gmail.com> - 2015-05-29 12:08 -0400
    Re: What is considered an "advanced" topic in Python? Mike Driscoll <kyosohma@gmail.com> - 2015-05-29 09:55 -0700
  Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-30 02:09 +1000
    Re: What is considered an "advanced" topic in Python? Mike Driscoll <kyosohma@gmail.com> - 2015-05-29 09:57 -0700
      Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-30 03:08 +1000
      Re: What is considered an "advanced" topic in Python? random832@fastmail.us - 2015-05-31 23:18 -0400
      Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-06-01 13:43 +1000
      Re: What is considered an "advanced" topic in Python? Laura Creighton <lac@openend.se> - 2015-06-01 09:58 +0200
        Re: What is considered an "advanced" topic in Python? Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 12:36 +0300
          Zero [was Re: What is considered an "advanced" topic in Python?] Steven D'Aprano <steve@pearwood.info> - 2015-06-01 22:07 +1000
            Re: Zero [was Re: What is considered an "advanced" topic in Python?] Laura Creighton <lac@openend.se> - 2015-06-01 14:52 +0200
            Re: Zero [was Re: What is considered an "advanced" topic in Python?] Dave Farrance <DaveFarrance@OMiTTHiSyahooANDTHiS.co.uk> - 2015-06-01 13:56 +0100
              Re: Zero [was Re: What is considered an "advanced" topic in Python?] Skip Montanaro <skip.montanaro@gmail.com> - 2015-06-01 08:14 -0500
                Re: Zero [was Re: What is considered an "advanced" topic in Python?] Dave Farrance <df@see.replyto.invalid> - 2015-06-01 15:39 +0100
              Re: Zero [was Re: What is considered an "advanced" topic in Python?] Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-01 18:35 +0100
              Re: Zero [was Re: What is considered an "advanced" topic in Python?] Terry Reedy <tjreedy@udel.edu> - 2015-06-01 17:32 -0400
            Re: Zero [was Re: What is considered an "advanced" topic in Python?] Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 16:18 +0300
              Re: Zero [was Re: What is considered an "advanced" topic in Python?] random832@fastmail.us - 2015-06-01 09:32 -0400
        Re: What is considered an "advanced" topic in Python? Dave Farrance <DaveFarrance@OMiTTHiSyahooANDTHiS.co.uk> - 2015-06-01 11:44 +0100
          Re: What is considered an "advanced" topic in Python? Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 13:54 +0300
        Re: What is considered an "advanced" topic in Python? Rustom Mody <rustompmody@gmail.com> - 2015-06-01 22:33 -0700
      Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-06-01 19:45 +1000
      Re: What is considered an "advanced" topic in Python? Laura Creighton <lac@openend.se> - 2015-06-01 12:28 +0200
        Re: What is considered an "advanced" topic in Python? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-01 14:22 +0100
      Re: What is considered an "advanced" topic in Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-01 11:34 +0100
      Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-06-01 20:36 +1000
      Re: What is considered an "advanced" topic in Python? Laura Creighton <lac@openend.se> - 2015-06-01 13:00 +0200
      Re: What is considered an "advanced" topic in Python? Laura Creighton <lac@openend.se> - 2015-06-01 13:24 +0200
        Re: What is considered an "advanced" topic in Python? Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 14:57 +0300
          Re: What is considered an "advanced" topic in Python? BartC <bc@freeuk.com> - 2015-06-01 13:27 +0100
          Re: What is considered an "advanced" topic in Python? MRAB <python@mrabarnett.plus.com> - 2015-06-01 13:27 +0100
          Re: What is considered an "advanced" topic in Python? Laura Creighton <lac@openend.se> - 2015-06-01 17:07 +0200
            Re: What is considered an "advanced" topic in Python? alister <alister.nospam.ware@ntlworld.com> - 2015-06-01 15:26 +0000
              Re: What is considered an "advanced" topic in Python? Laura Creighton <lac@openend.se> - 2015-06-01 17:51 +0200
              Re: What is considered an "advanced" topic in Python? MRAB <python@mrabarnett.plus.com> - 2015-06-01 18:06 +0100
                Re: What is considered an "advanced" topic in Python? Marko Rauhamaa <marko@pacujo.net> - 2015-06-01 20:14 +0300
            Re: What is considered an "advanced" topic in Python? BartC <bc@freeuk.com> - 2015-06-01 16:42 +0100
              Re: What is considered an "advanced" topic in Python? Grant Edwards <invalid@invalid.invalid> - 2015-06-01 17:02 +0000
                Re: What is considered an "advanced" topic in Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-01 18:45 +0100
                Re: What is considered an "advanced" topic in Python? Grant Edwards <invalid@invalid.invalid> - 2015-06-01 18:23 +0000
        Re: What is considered an "advanced" topic in Python? BartC <bc@freeuk.com> - 2015-06-01 13:24 +0100
      Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-06-01 23:52 +1000
        Re: What is considered an "advanced" topic in Python? BartC <bc@freeuk.com> - 2015-06-01 16:17 +0100
          Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-06-02 02:10 +1000
            Re: What is considered an "advanced" topic in Python? Rustom Mody <rustompmody@gmail.com> - 2015-06-01 21:46 -0700
  Re: What is considered an "advanced" topic in Python? Skip Montanaro <skip.montanaro@gmail.com> - 2015-05-29 11:39 -0500
    Re: What is considered an "advanced" topic in Python? Mike Driscoll <kyosohma@gmail.com> - 2015-05-29 09:58 -0700
  Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-30 02:50 +1000
  Re: What is considered an "advanced" topic in Python? Todd <toddrjen@gmail.com> - 2015-05-29 19:02 +0200
  Re: What is considered an "advanced" topic in Python? sohcahtoa82@gmail.com - 2015-05-29 10:03 -0700
    Re: What is considered an "advanced" topic in Python? Ethan Furman <ethan@stoneleaf.us> - 2015-05-29 10:17 -0700
      Re: What is considered an "advanced" topic in Python? sohcahtoa82@gmail.com - 2015-05-29 14:06 -0700
        Re: What is considered an "advanced" topic in Python? Jason Swails <jason.swails@gmail.com> - 2015-05-29 17:28 -0400
        Re: What is considered an "advanced" topic in Python? Ethan Furman <ethan@stoneleaf.us> - 2015-05-29 14:39 -0700
        Re: What is considered an "advanced" topic in Python? Ethan Furman <ethan@stoneleaf.us> - 2015-05-29 14:44 -0700
    Re: What is considered an "advanced" topic in Python? Marko Rauhamaa <marko@pacujo.net> - 2015-05-29 20:24 +0300
  Re: What is considered an "advanced" topic in Python? Todd <toddrjen@gmail.com> - 2015-05-29 19:03 +0200
  Re: What is considered an "advanced" topic in Python? Steven D'Aprano <steve@pearwood.info> - 2015-05-30 03:55 +1000
    Re: What is considered an "advanced" topic in Python? Mike Driscoll <kyosohma@gmail.com> - 2015-05-29 13:38 -0700
  Re: What is considered an "advanced" topic in Python? Sturla Molden <sturla.molden@gmail.com> - 2015-05-30 12:15 +0000
  Re: What is considered an "advanced" topic in Python? jonathon <jonathon.blake@gmail.com> - 2015-05-30 19:32 +0000
  Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-31 08:24 +1000
  Re: What is considered an "advanced" topic in Python? "C.D. Reimer" <chris@cdreimer.com> - 2015-05-30 18:28 -0700
  Re: What is considered an "advanced" topic in Python? Rustom Mody <rustompmody@gmail.com> - 2015-05-30 20:30 -0700
    Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-31 14:25 +1000
      Re: What is considered an "advanced" topic in Python? Rustom Mody <rustompmody@gmail.com> - 2015-05-30 21:46 -0700
        Re: What is considered an "advanced" topic in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-31 14:58 +1000
          Re: What is considered an "advanced" topic in Python? Rustom Mody <rustompmody@gmail.com> - 2015-05-30 22:18 -0700
  Re: What is considered an "advanced" topic in Python? Gene Heskett <gheskett@wdtv.com> - 2015-06-01 09:49 -0400
  Re: What is considered an "advanced" topic in Python? Denis McMahon <denismfmcmahon@gmail.com> - 2015-06-01 15:30 +0000
  Re: What is considered an "advanced" topic in Python? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-06-01 20:33 -0400
  Re: What is considered an "advanced" topic in Python? Gene Heskett <gheskett@wdtv.com> - 2015-06-01 23:30 -0400

csiph-web