Considering migrating to Python from Visual Basic 6 for engineering applications
bc at freeuk.com
Sun Feb 21 08:16:07 EST 2016
On 21/02/2016 07:28, Larry Hudson wrote:
> On 02/20/2016 10:38 AM, wrong.address.1 at gmail.com wrote:
>> Or can I write my own reading subroutines which can then be called like
>> ReadVBstyle 8, ND, NIN, NT
>> to make the code more readable?
> ABSOLUTELY!! Most Python programming consists of defining the functions
> and classes needed, which definitely makes Python more readable.
> No need for anyone to re-invent the
> wheel! ;-)
I keep seeing this in the thread. Python has all this capability, yet it
still requires a lot of fiddly code to be added to get anywhere near as
simple as this:
read f, a, b, c
And this is code that is not going to be obvious to anyone starting out.
Even accepting that syntax limitations might require this to be written as:
readline(f, a, b, c)
I can't see a straightforward way of making this possible while still
keeping a, b and c simple integer, float or string types (because
Python's reference parameters don't work quite the right way).
(There is also the question of 'readline' knowing what types of values
to read. This information would not be needed in Fortran or Basic but
somehow needs to be supplied here, if a particular set of types is to
imposed on the input.)
In other words, it seems this particular wheel does require re-inventing!
More information about the Python-list