[Tutor] What these Python user-defined functions do?

2016-05-21 Thread Max Jegers
Hi, I started learning Python (v3.5) and was given some code samples to assist in my studies. There are some things I could not figure out using Python documentation or other online sources. I have experience with SQL programming and some procedural programming, but little in terms of OOP. I tr

Re: [Tutor] What these Python user-defined functions do?

2016-05-21 Thread Alan Gauld via Tutor
On 21/05/16 02:21, Max Jegers wrote: > class View: > def __init__(self): > self.handle = None > > def order(self, n): > return hostviewOrder(handle, self.handle, n) > > def put(self, fieldName, value, verify=1): > if verify == True: >

Re: [Tutor] Getting started in testing

2016-05-21 Thread Albert-Jan Roskam
(sorry for top-posting) I liked https://www.packtpub.com/application-development/python-testing-beginners-guide though perhaps it was a bit too basic. It covers forest, unit test, nose. > Date: Thu, 19 May 2016 12:34:27 -0700 > From: carr...@tjc.com > To: tutor@python.org > Subject: [Tutor] Get

[Tutor] Python 3: string to decimal conversion

2016-05-21 Thread Saidov
Hello all, I am working on a piece of python code that's supposed to help me manage a budget: 1. Read a banking statement 2. Categorize expenses and income by month and by type 3. Print out a report comparing the projected expenses/income with actual numbers. *File characteristics:* Banking stat

[Tutor] Never need to apologise for top-posting: just don't do it (was: Getting started in testing)

2016-05-21 Thread Ben Finney
Albert-Jan Roskam writes: > (sorry for top-posting) If you know enough to apologise for the mistake, you know enough to avoid the mistake. Resist that urge. Delay the response until you can compose it on a device that makes it feasible to reply interleaved. -- \ “I have an answering mach

Re: [Tutor] Getting started in testing

2016-05-21 Thread Ben Finney
Terry Carroll writes: > Is anyone aware of any good tutorials on testing one's Python code? > > Any resources would be helpful. I am aware of the docs on unittest, > but I'm looking for a more tutorial approach. The book Dive Into Python (available both for Python 2 and Python 3) http://www.dive

Re: [Tutor] Python 3: string to decimal conversion

2016-05-21 Thread Ben Finney
Saidov writes: > *Python Version: 3.5 (64 bit)* > IDE:Microsoft Visual Studio Community 2015 Your IDE is apparently suppressing, or hiding somewhere, the full traceback of the exception. It's important that you always have that in front of you when trying to diagnose an un-handled exception. >

Re: [Tutor] Python 3: string to decimal conversion

2016-05-21 Thread cs
Hi Saidov, I'm going to reply to your post inline, as that is the etiquette here and in many technical mailing lists. On 21May2016 13:34, Saidov wrote: I am working on a piece of python code that's supposed to help me manage a budget: 1. Read a banking statement 2. Categorize expenses and in