Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #107527 > unrolled thread
| Started by | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| First post | 2016-04-23 18:45 -0700 |
| Last post | 2016-04-23 18:45 -0700 |
| 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.
Re: How much sanity checking is required for function inputs? Christopher Reimer <christopher_reimer@icloud.com> - 2016-04-23 18:45 -0700
| From | Christopher Reimer <christopher_reimer@icloud.com> |
|---|---|
| Date | 2016-04-23 18:45 -0700 |
| Subject | Re: How much sanity checking is required for function inputs? |
| Message-ID | <mailman.20.1461462339.32212.python-list@python.org> |
On 4/22/2016 1:40 PM, Michael Selik wrote: > 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. I disagree. I wrote procedural scripts and translated old BASIC games into Python for two years. One day I came across a Python book that described the principles of subclassing from a base class for chess pieces, but there was no code to demonstrate the process. I had no problem creating the Python classes. That's how my research project got started to build a chess engine. If you ever check the academic literature for chess programming, this research project could turn into a lifelong endeavor. I had to confront all the bad habits I brought over Java and change my code to be more Pythonic. This is where I started having fun, learning the tricks and collapsing multi-line code into a single line code. I've learned more about Python in the few weeks than I had in two years of writing procedural scripts and translating BASIC goto hell. Thank you, Chris R.
Back to top | Article view | comp.lang.python
csiph-web