the library functions. They
will take proper account of the character set being used (which you
shouldn't even have to know for a task like this, let alone make unsafe
assumptions about).
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
I've ever known have had experience
with quite a lot of languages.
I know 10 languages. But I'm not telling you what base that number is :)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
to be sure that something can't change.
In particular, efficient dictionary implementations need the keys to
be immutable, because it you change a key it /really/ fouls up the
look-up.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
that in *all* cases you do whatever is
*clearest*, then switch to the other one if and only if performance is
unacceptable *and* profiling reveals this to be the bottleneck? That
avoids your deadlock (or is it livelock?) state.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
* the program by the user.
Who -- unless AI has advanced further than I thought -- is *outside*
the program.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
mandatory, not merely the only clean way to exit.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
has
happened that *should* have, because it happens to have the right
behaviour (even if the overhead doesn't matter), then one is
misrepresenting the program logic.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/10/11 Philip Semanchuk phi...@semanchuk.com:
IMHO, break, goto, etc. have their place, but they're ripe for abuse which
leads to spaghetti code.
Unrestricted goto can leat to spaghetti code, but surely break can't?
AFAICS, any break construct will still be H-K reducible.
--
Tim Rowe
for flow control.
Thankfully, python programmers are less dogmatic, and use whatever makes
sense to use. I hope.
Absolutely. And it doesn't make sense to use exceptions for flow control :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
)
And with enough static analysis to guarantee that the break will be
reached? I think it would be a bit much to expect Python to solve the
halting problem!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
, if you can define
a loop variant then you gurantee that the loop will terminate.
Even if you are not being formal, just considering what the loop
variants and invariants can save no end of trouble with tricky loops.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
idiot...
motherfucking aggresive
it's just few of priest fuckheads
look at lojban's motherfucking idiotic logo
If you really knew anything about social function you would be able to
work out why people think you are a troll.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
it was released.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
that this just looked and sounded like grief and wasn't
actually grief.
By the way, at the moment I am thinking of a sort of purple
blob-shaped monster with tentacles and fangs, that my language doesn't
have a word for and that I have never seen. On your theory, how come I
am thinking about it?
--
Tim
2009/7/31 Steven D'Aprano st...@remove-this-cybersource.com.au:
On Thu, 30 Jul 2009 18:47:04 +0100, Tim Rowe wrote:
That and the fact that I couldn't stop laughing for long enough to learn
any more when I read in the Pragmatic Programmer's Guide that Ruby,
unlike less flexible languages, lets
languages, lets you alter the value of a
constant. Yep, as they say Bug = Undocumented feature!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/7/30 superpollo u...@example.net:
Tim Rowe wrote:
Any language that gets any sort of real use has to have. For instance,
I love Ada's numeric types (you can specify either the minimum number
of significant figures or the maximum delta for a real type, and it
will give you a type
on the concept of dictionaries it's not obscure
at all!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
in Ada. I shall now enter a period of self-refelection to
try to work out why I am so inconsistent :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
in the production run-time then there's something wrong with your
development and testing processes.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
You *know* the input is often wrong, but you're not bothering to check
it?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
that just
checks that the comment exists without understanding its contents
simply is not adding value but is rather petty bureaucracy that will
annoy the programmers.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
to be a response to the persistent
refusal to accept his assurances that he is not using the assertions
for run-time error checking, nor teaching the students to do that,
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
is saddening, and indicative of why there's so
much buggy software out there.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
for developing GUI!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Ada MS Windows thick wrappers (ie, ones that feel
natural to Ada) are built on top of Win32Ada, which stays as close to
the underlying C interface as it can.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
that you know the difference. Sorry for the confusion.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
;
if ((bilbo() == 0) || (gandalf() == 0)
{
/* lot's of code here */
}
else rval = -1;
return rval;
}
I'd be inclined to do it that way even if multiple exits were allowed;
it just seems so much clearer.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
And then by showing the conclusion is false, you believe you have
shown a contradiction? Try looking up Affirming the consequent!
GOTO is an /unstructured/ jump. Raise, break, continue, if, for and so
an are all /structured/ jumps.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
case there would be
no reason for him not to cut his Python teeth (fangs?) on it.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
in Ada (it shows
its Pascal roots) but in all the studies I've seen Ada production code
has consistently shown fewer errors than the more concise C/C++ family
of languages.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
see that it pretty much *is* Modula2. So whether Modula2 was a
direct influence or not, it seems to have found its way in.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/4/17 Michael Torrie torr...@gmail.com:
Spaghetti code can be written in *any* language.
I challenge you to write spahgetti code in SPARK!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
), or you
could find yourself either with an application you can't use or a very
big lawsuit and possibly jail if it goes wrong.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/4/9 Miles semantic...@gmail.com:
Clearly, any comparison with a boolean literal should be illegal. ;)
Hey, we could have strict type checking at compile time of /all/
operations, couldn't we? Anybody care to join me over at the Ada list?
;-)
--
Tim Rowe
--
http://mail.python.org/mailman
will be too trivial, and it won't
give you the derived classes you need, but it's a good first step to
breaking a problem down, and might help break your one big class
habit.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/3/20 Hendrik van Rooyen m...@microcorp.co.za:
A joke based on the Monty Python series is BY DEFINITION not stupid!
But may get /too/ silly.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
applications, each one has
different compromises. You've just discovered one of Python's.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
in the proposal being considered addresses any of that.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
confusion..
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
and non-professional
programmers find the locale approach to be frustrating, arcane and
non-obvious then by all means propose a way of making it simpler and
clearer, but not a bodge that will increase the amount of bad software
in the world.
-1 for all of the proposals.
--
Tim Rowe
--
http
2009/3/8 Tim Roberts t...@probo.com:
Tim Rowe digi...@gmail.com wrote:
I don't think the article is right that it's silly to have some
expression/statement groupings indentation based and some grouped by
enclosing tokens -- provided it's done right. The OCAML-based
language F# accepts OCAML
-- a reasonable programmer
can become productive in Python very quickly. For one programmer's
experience of learning Python have a look at
http://www.python.org/about/success/esr/ (although I grant that Eric
Raymond might count slightly higher than just a /reasonable/
programmer!)
--
Tim Rowe
--
http
exactly in decimal can end up as
recurring decimals in binary. 0.8 looks nice and tidy, but in binary
(if I get this right) it's 0.1100110011001100..., recurring ad
infinitum. The computer has to truncate it somewhere.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
). That seems
to me to work pretty cleanly.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
in Ruby too) is to get
the code working, then if there are any *measured* bottlenecks to
optimise them in C++. That means that in practice there won't be a
perceptible speed difference for the user.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
records,
and it won't all fit into memory. So your observation is pertinent.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
as soon as they're checked,
so with some clever buffering you can stop them from clogging up the
buffer. The worst case is if there are a lot of genuine collisions, in
which case it's probably not a very good hash.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
think there are a couple that Python
works well with, but I've never looked into that -- others will no
doubt be along with recommendations now I've raised the subject.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
your tutor why he/she got you to
convert the whole phrase to upper case, wasting a whole pile of
character conversion operations under the hood, because it's only the
acronym that needs to be converted :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
an enlightening question; but, sometimes they just make
unhelpfull wisecracks. It's a tough choice.
I used to use a baby, which avoids the embarrassment but can be just
as problematic to order on the internet.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
are you interpreting it as a Boolean?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
[10,30,20,20,11,12,13] and the tolerance were 2?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
. I
think it will be a long search.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
will depend on the project.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
of /execution/ that is.
Different languages have different trade-offs. Python's trade-offs
suit us. If they don't suit you, use a language with trade-offs that
do.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
threads and processes and
programmer choose the way. I really believe that GIL is a design
error.
It's only an error if it gets in the way. It's the experience of a lot
of programmers that it doesn't, so it's not an error.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
. But in the real world I doubt they're enough to
make a significant dent in Python's popularity.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
, was a dream in Python when I'd probably still be coding
it today in C++. Horses for courses. It's almost always wrong to say
that language A is better than language B; the most you can say is
that language A is better than language B for some specific task.
--
Tim Rowe
--
http://mail.python.org
2009/2/12 km srikrishnamo...@gmail.com:
Hi,
you could do it this way also :
if i in [3,5]:
do something...
True, you could do it, but it would be wrong. The original is true for
i = 6, 9, 10, 12 and so on, but yours doesn't seem to be...
--
Tim Rowe
--
http://mail.python.org/mailman
it without using a while loop, but to help you we need to know
what *you* know). Like: do you understand what a while loop does? And
so on.
We're a pretty friendly bunch in here, but most of us believe in
tough love (http://en.wikipedia.org/wiki/Tough_love).
--
Tim Rowe
--
http://mail.python.org
about it? Except in the sense of inspiring awe, of
course. No, Steven's example isn't broken, it works as the epydoc
authors intended.
(it's still in 3).
Good.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
inefficient code.
Is adding and a modulus *really^ more efficient than flipping a bool
as I suggested? I think I'd want to see measurements!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
insisted on premature optimisation (The root of all evil,
according to C A R Hoare), especially in a scripting language!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/2/5 mk mrk...@gmail.com:
(duck)
542 comp.lang.python rtfm
467 comp.lang.python shut+up
263 comp.lang.perl rtfm
45 comp.lang.perl shut+up
Yes, but is there any real traffic on comp.lang.perl nowadays?
Sorry, cheap shot ;-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo
other form of hedging in a position that
could modify the unfriendly text?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
-platform
-- as long as we stay clear of the os module :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
than 0.0 (which I think
all representations can represent exactly). What am I missing here?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
) and will
give me the answer inf) so presumably he's trying to protect against
divide by zero. So my next question is whether there is any x that can
be returned by float() such that x != 0 but some_number / (2 * x)
raises a ZeroDivisionError?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python
2009/2/4 Scott David Daniels scott.dani...@acm.org:
Thanks for that. It makes me feel guilty to point out that:
addition is not associative in real numbers
should presumably be addition is not associative in floating point numbers.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo
have to use exception handling and catch
the Windows case?
That's the trouble with using anything in os, of course -- it's os
dependent, which is why it's there! :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
with the differences
between versions..
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
:-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/2/5 afri...@yahoo.co.uk:
On Feb 5, 11:14 am, Tim Rowe digi...@gmail.com wrote:
...
On an MS Windows system, os.uname()[0] raises an AttributeError -- sys
doesn't seem to contain uname. Is that a Linux thing? Would os.name
work on Linux? Or would one have to use exception handling
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
, never mind 3.0). Unless all you want is in the standard
library, I think it's worth the general user holding back for a while
whilst the tool providers catch up.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
-- when fixed -- may be what you need.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/2/3 Jervis Whitley jervi...@gmail.com:
real programmers use ed.
Ed? Eee, tha' were lucky. We had to make holes in Hollerith cards wi'
our bare teeth...
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
philosophy what would be the point of different
languages? Is it worth mentioning (again) that Python is not Java?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
see how it would be any different to any other
language. Admittedly I use the IDE because I like IDE's, but I don't
see why it wouldn't work with a text editor and make -- the command
line compiler is there.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/2/2 Russ P. russ.paie...@gmail.com:
On Feb 2, 2:46 pm, Tim Rowe digi...@gmail.com wrote:
No, we're supposed to believe that the designers of C++, Java, Ada,
and Scala are all designers of languages that are not Python. If all
languages had the same philosophy what would be the point
2009/1/30 Scott David Daniels scott.dani...@acm.org:
Be careful with your assertion that a regex is faster, it is certainly
not always true.
I was careful *not* to assert that a regex would be faster, merely
that it was *likely* to be in this case.
--
Tim Rowe
--
http://mail.python.org
oriented design (Python doesn't). So the answer to Is Python
Object-Oriented is either yes or no, depending on what you're
/really/ asking.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
positives.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
that treats '\n' as a terminator (eg, Linux) rather than as a
separator (eg, MS DOS/Windows).
Perhaps what you don't /really/ want to be reminded of is the
existence of operating systems other than your preffered one?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
don't recognise a
difference between System and Applications Hungarian, by the way --
the difference is eliminated if you declare types corresponding to the
meanings, which is commonplace in, for example, Ada.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
not fit all, one language is not ideal for all applications.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
(not the organisation) is
more than a few people.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
is tolerable. The loop variant can help with that, too.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
and the GIL.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
must surely know about Schluehr's
Law? ;-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2009/1/23 Martin P. Hellwig martin.hell...@dcuktec.org:
Or you can argue that even when an argument is repeated indefinitely it
doesn't make it suddenly right.
No, but it makes for a confirmation of Schluehr's law :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
-complete. Specifically, all
loops that are required to terminate require a loop variant to be
defined. Typically the loop variant is a finite non-negative integer
that provably decreases on every pass of the loop, which makes halting
decidable.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo
of that is because of language differences and how
much is because Ada tends to be used on critical projects that also
tend to get a lot more attention to development standards.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
after the Ariane 5 incident. I've been at jollier funerals. I can't
help thinking that thinking that the team would have benefited from
reading David Parnas's work on the specification of the A-7E avionics.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
, I'm quite interested about where in ATM you plan to use
Python code, and how you will be meeting the applicable safety
standards in the relevant administration.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 151 matches
Mail list logo