Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Debugging (was Re: Why not allow empty code blocks?) Date: Wed, 3 Aug 2016 06:50:02 +1000 Lines: 40 Message-ID: References: <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579ca644$0$1589$c3e8da3$5496439d@news.astraweb.com> <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de yniw+bKtpSz6+skgkbWW6w05OfcOu+mZ9GdtJmxtGiyQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'that?': 0.05; '*not*': 0.07; 'correct.': 0.07; 'objects,': 0.07; 'subject:code': 0.07; 'cc:addr:python-list': 0.09; 'ignoring': 0.09; 'obj': 0.09; 'objects:': 0.09; 'slices': 0.09; 'subject:Why': 0.09; 'python': 0.10; 'subject:not': 0.11; 'syntax': 0.13; 'do,': 0.15; 'wed,': 0.15; '(either': 0.16; '2016': 0.16; 'cool.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'language)': 0.16; 'non- integers': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:?)': 0.16; 'subject:allow': 0.16; 'useless': 0.16; 'wrote:': 0.16; 'differ': 0.18; 'creates': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'ones.': 0.22; 'am,': 0.23; 'bit': 0.23; '(or': 0.23; 'third-party': 0.23; 'header:In- Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'object,': 0.27; 'fine': 0.28; "people's": 0.29; 'objects': 0.29; 'that.': 0.30; 'point': 0.33; 'url:python': 0.33; 'foo': 0.33; 'lists': 0.34; 'list': 0.34; 'received:google.com': 0.35; "isn't": 0.35; 'but': 0.36; 'url:org': 0.36; '(and': 0.36; "wasn't": 0.36; 'subject:: ': 0.37; 'method': 0.37; 'beyond': 0.37; 'christian': 0.38; 'stuff': 0.38; 'goes': 0.39; 'some': 0.40; 'miss': 0.77; '"hey,': 0.84; '"look': 0.84; 'chrisa': 0.84; 'gollwitzer': 0.84; 'huh?': 0.84; 'to:none': 0.91; 'same,': 0.91; 'imagine': 0.96 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:cc; bh=yphVGgWS5pN3gO48rKI14RsRvuDNm+EwWKRwhwWog9Q=; b=s9K+520Kb4ZL6eO5uwB4q/ukOxJ2AZBPqDRSb9cWmZ3ZFV3G4JH+6x0+9ZKw12dUWR QE6BwQqt8jct77OqdzT66QTJWDL0axNoEaIN5RDWWNRQzbWri3o4P17De+/+bd51OtRI uiPCv5lj5pb8WanZE+hkfkXSuiESp3Mionslr1YDgjn6aUjUyYGmR+oaqANP6RSYcFIJ 0kUXjiWsPX3fOBxYRqadisGHuQXtEicMv2ap+KIT2Y34iVHVvOJzfXrV0P10Np0/KoRK AWv6fNGSvskAhbQjwBJoOMTtSt19gJ5EzypmQ9oQ1xA2F+LjKnWZA9BTq+O/0OqwH9LO Z7/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=yphVGgWS5pN3gO48rKI14RsRvuDNm+EwWKRwhwWog9Q=; b=I1ir2xXcuDraRYuxeC8mQO4eq0bh1d4f1jDhUCxVp6jEilGjlvZ7//oMK6YpVbV5dG u/i4L+WrLIuN5V0lpECFG4SWpUxk+YsTIi/HrFQCGB6hAzrkwIu6jjPsterbIhK0lh0T 9lMOy1f37uaNDu3dHVY1LN+dWo4k6FhlHH7Zhk81jNzUp/X8R+c4smc7uYkjlwmubeoI N0JaZJOrjPFJ7V2FP3hSuG9N3uoKpu+ekmb5/DxINZF58y87mOFDZdvXmcPmm7P2+I2/ NSmWtLcmMrJt36NosJLor+qUeiU8+69TXuCx0vvD8j14VKjpNVB3nqjq1ODvBbNWdrKe Tv8w== X-Gm-Message-State: AEkoouszxs3q8ND5ijRCH0U55r5HMBt0cvqHmESK7n0eYqndZd4xm9Ci0hG6PndL7yQq3JTMHUNb5vh8yVqsNw== X-Received: by 10.28.142.135 with SMTP id q129mr64325189wmd.41.1470171003749; Tue, 02 Aug 2016 13:50:03 -0700 (PDT) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579ca644$0$1589$c3e8da3$5496439d@news.astraweb.com> <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:112253 On Wed, Aug 3, 2016 at 5:55 AM, Christian Gollwitzer wrote: >> - Arbitrary-precision non-integers > > > https://pypi.python.org/pypi/bigfloat/ > > ? Wasn't aware of that. Cool. Not that I need it very often (and when I do, I can use Pike, which has MPFR support built-in). Or I can use decimal.Decimal, which isn't exactly the same, but often accomplishes the same thing. >> - Convenient syntax for a few array/list manipulations > > > Huh? Slices and list comprehensions go a long way. What syntax can you > imagine that goes beyond that? Imagine you have a list (or array, depending on language) of objects, some of which may be None (or null). Call the foo method on every object, ignoring the null/None ones. # Python - creates a useless list [obj.foo() for obj in objects if obj] # Python - a bit clunky for obj in objects: if obj: obj.foo() //Pike objects->foo(); But my point wasn't "hey, Python sucks", but "look what is *not* on my list". Other people's lists of stuff they miss will differ (either because they know of third-party solutions, like bigfloat, or because they just don't need them... like bigfloat), and that's fine and correct. ChrisA