Not only does Python have indenting, but that's all it has to denote nested statements. No brackets or parentheses.
Not only does Python have indenting, but that's all it has to denote nested statements. No brackets or parentheses.
-- Reply in group, but if emailing add one more zero, and remove the last word.
When I was young I wanted to try programming assembly while drunk, but I was only drunk a few times and never had the opportunity.
I wonder if a "Rain Man" type can learn to program.
-- Reply in group, but if emailing add one more zero, and remove the last word.
Isn't that where windows came from?
That's the main thing I didn't like about it. Hit the reformat button and you destroy the program.
Cheers
Phil Hobbs
-- Dr Philip C D Hobbs Principal Consultant
A bracket by any other name...
Oddly enough, obfuscated BASIC is much clearer than C (and I should suppose, obfuscated Python even clearer still; give or take, like, abuse of edge cases in those massive libraries, or whatever). White space makes no difference in C; in BASIC, you have the colon to help screw things up, but you can only chain so many statements before, say, a one-line IF statement has to end. (To be fair, I suppose any obfuscator worth their salt would simply turn to the WHILE or DO statement, with the added bonus of looking perverse.)
Tim
-- Seven Transistor Labs Electrical Engineering Consultation
But Wait! There's more!
Python with Braces
Python with Braces is a variant of the Python programming language, that has one significant difference: it uses standard C style braces for defining scopes rather than the classic python indentation. This makes Python more similar to other programming languages, and can also enable the introduction of new concepts such as anonymous functions and classes to Python.
Don't worry, be happy.
Frank McKenney
-- Don't be afraid to take a big step. You can't cross a chasm in two small jumps. --David Lloyd George
well,
1) don't do that 2) if you do it, hit UNDO 3) stop using Microsoft Word for writing software:)
Personally I like the indenting, it feels quite natural, just like I e.g. write pseudocode. Most half-decent programmers editors will work fine with it.
-- John Devereux
You and I and everyone else indent stuff, of course. I just don't like it changing the semantics.
Cheers
Phil Hobbs
-- Dr Philip C D Hobbs Principal Consultant
the worst is make requiring tabs not spaces
-Lasse
I know. Infuriating, even with a decent programmer's editor.
Cheers
Phil Hobbs
-- Dr Philip C D Hobbs Principal Consultant
To add to that..
Jamie
A few other resources for low current (fA/attoA) measurements:
-video on ti.com on how to scrub a chip
-Bob Pease - femtoampere stuff anyhow "electrometer grade chips" techlib.com - ion chamber circuits just in case...
I don't deny your feelings, but isn't it like a bad radio you listen to, then after a while it sounds OK? I realize there are limits to that... I do prefer C, but there is a graphics library, SimpleCV, which runs on linux on the RPi. It's in Python. I suppose it's a tradeoff. You get some higher level commands along with the slowness and imprecision. Never used it...
Thanks for the heads up.
?-)
This makes no sense. Python already /has/ anonymous functions (lambdas) and classes, and has done since its earliest days.
IIRC, last time I looked for these the later editions seemed dumbed down (and shorter).
-- John Devereux
Lots of people like Python, and if I were just starting out, I might well go with it. (My son the physics student likes it a lot better than Matlab, for instance.)
What I generally do is to write a C++ program that talks to Gnuplot via a pipe. Once you figure that out once, you can just hack up the old program to do the new thing. ;)
Cheers
Phil Hobbs
-- Dr Philip C D Hobbs Principal Consultant
I still think it's a good first language for learning to program, since it's powerful but not cryptic.
-- Reply in group, but if emailing, add a zero and remove the last word.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.