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


Groups > comp.lang.python > #107510 > unrolled thread

Re: How much sanity checking is required for function inputs?

Started byMichael Selik <michael.selik@gmail.com>
First post2016-04-22 20:40 +0000
Last post2016-04-22 20:40 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How much sanity checking is required for function inputs? Michael Selik <michael.selik@gmail.com> - 2016-04-22 20:40 +0000

#107510 — Re: How much sanity checking is required for function inputs?

FromMichael Selik <michael.selik@gmail.com>
Date2016-04-22 20:40 +0000
SubjectRe: How much sanity checking is required for function inputs?
Message-ID<mailman.6.1461357665.32212.python-list@python.org>
On Fri, Apr 22, 2016, 1:26 AM Stephen Hansen <me@ixokai.io> wrote:

> On Thu, Apr 21, 2016, at 08:33 PM, Christopher Reimer wrote:
> > On 4/21/2016 7:20 PM, Stephen Hansen wrote:
> > > I... that... what... I'd forget that link and pretend you never went
> > > there. Its not helpful.
> >
> > I found it on the Internet, so it must be true -- and Pythonic at that!
>
> My advice is to not look at that site further. I can't count the number
> of things that are just... not useful or helpful.
>
> Directly translating the Gang of Four Design Pattern book to Python
> doesn't generally result in useful ideas, except in certain abstractions
> like the visitor pattern when you're designing big systems.
>

Frankly, for someone coming from Java, the best advice is to not write any
classes until you must. Of course classes in Python are very useful. It's
just that your Java habits are unnecessary and often counter-productive.

Just make some globals and some functions. Heck, even write procedurally
for a while. Free yourself from the Kingdom of Nouns.
http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of-nouns.html

>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web