concise code (beginner)

bambam david at asdf.asdf
Sun Sep 9 21:42:25 EDT 2007


I'm testing a series of scripts.
The scripts are testing a series of hardware devices.
The scripts are a sequence of device commands.
The scripts have sequence numbers.

I am adding exception handling to the to the 'inner
platform' that executes sequences.

I am doing this because testing of error cases has
demonstrated that the 'inner platform' is fragile.

http://worsethanfailure.com/Articles/The_Inner-Platform_Effect.aspx

on the other hand:
http://www.amazon.com/gp/cdp/member-reviews/A2M9XZ2UD8ZM40?ie=UTF8&display=public&sort_by=MostRecentReview&page=5
and
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/207645

In any case, the hardware test instruments are not programmable
in python, and most of them do not have loop constructs in the
platform language.

I'm not sure how you are reading these messages. Can you see the
thread history?

Steve.

"Steven D'Aprano" <steven at REMOVE.THIS.cybersource.com.au> wrote in message 
news:pan.2007.09.07.03.42.06 at REMOVE.THIS.cybersource.com.au...
> On Fri, 07 Sep 2007 12:03:26 +1000, bambam wrote:
>
>> Hi Steven.
>>
>> Looking at your code, why are you naming the value __all__? It looks
>> like a built-in variable?
>
> When you say:
>
> from module import *
>
> Python looks in the module for a list of names called "__all__", and
> imports only the names in that list. It is recommended that your modules
> take advantage of that feature. I'm just using the same name.
>
>
>> Unless there is an automatic way to correctly get the function list, I
>> will probably be better off giving the lines sequence numbers, and
>> generating the function list from that.
>
> I don't understand what you mean by "giving the lines sequence numbers".
> Where do they come from? How do you go from sequence numbers to functions?
>
> As far as I am concerned, the right behavior is for the module containing
> the functions to define which functions need to be tested. Since modules
> aren't actually intelligent, that means some person needs to list the
> functions. Why list the function NAME when you can list the function
> itself?
> 





More information about the Python-list mailing list