.
--
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
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
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
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
). That seems
to me to work pretty cleanly.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
-- 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
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
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
in the proposal being considered addresses any of that.
--
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
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
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
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
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
), 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
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
on it, I use
the class directly, with classmethods. Essentially, the class is used
as a function that keeps state from one call to the next.
Sounds to me like a functor, aka a function object:
http://en.wikipedia.org/wiki/Function_object
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo
of thinking a
singleton was called for). That's the classic way of implementing a
class [to be] used as a function.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
required to do OO. But maybe the original blogger meant by fully OO
what I mean by Pure OO?
The question I usually ask is Does this language help me get the job
done? Python often does. That's all that really matters, isn't it?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
!
Can I put in a vote *for* the questioner's library dumping to
sys.exit() on any abnormal condition? It would reduce employment
competition for the rest of us.
Why, yes, I am wearing my BOFH hat. How could you tell?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
in
mod.update(a) and print mod.a is not defined. Did you mean mod1?
If I change it to that, both print statements print 20 as I'd
expect.
I take it you do have a *really* good reason to use a global?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
is due to a typo or some such (happens to us all!) but without
seeing the actual code there's not a lot we can do.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
stress that this is quick and dirty -- I'm sure somebody will be
along with something better soon!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
of python-list which seems to do a pretty good job of
blocking them
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
the problems
have fallen away and the job was done in an hour or so. But other
times it has been the other way around; I've done stuff in Python that
I wouldn't know where to begin with in other languages. One of my
constant refrains is that *no* tool is ideal for *all* jobs!
--
Tim Rowe
--
http
, and whilst that means gains in portability it means that
in return it loses the ease-of-programming of a tightly integrated
platform.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
would be at all
straightforward in Python (or C# for that matter, and although Spec#
gets closer, it really needs a language like Spark Ada).
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
take another look
and see how it's coming on.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
code. There could
actually be hundreds of parameters, for all I care. They're not my
concern. Most of the time I like that -- the tools are doing my work
for me.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
on that?
And C# has things that Python doesn't (such as static typing). Can we
agree on that, too?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
the tool that does the
job in hand most effectively?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2008/9/29 Roy Smith [EMAIL PROTECTED]:
That being said, the one class per file rule is a means to an end.
Although in some languages, the end is code that runs. But Python
is not Java...
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
more formal. That
suggests that the string's length is an easier phrase to produce and
understand, but the length of the string sounds more official.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
, plain and
simple. Working around it won't fix that.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
... Unless, there is some corresponding distinction in mechanics
between speaking and writing. That is, if something about the process
of generating writing makes it, post-modification, easier. I'm going
to assume that it's been observed across all modes of writing too, (in
addition to
library, of course, as is the case with regexp
support). Logic languages still seem to have the edge over imperative
in some AI and theorem proving applications (although I suppose one
/could/ implement Prolog in Python, if Prolog is what you need it's
probably best to go straight there).
--
Tim Rowe
to document properties. If
Gita can find that, Python should be at least as good for the job as
VB (and I think I'm being unduly kind to VB in putting it like that!)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2008/10/21 Marc 'BlackJack' Rintsch [EMAIL PROTECTED]:
Ever noticed that computer freaks often start counting at 0? ;-)
We grow to be like our pets
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
already has.
- Lambda expressions: Python already has.
- Auto-Implemented properties: No, but that's just syntactic sugar to
make declarations more compact.
So all of the language elements that are needed for LINQ are already
in Python; a library should do the trick.
--
Tim Rowe
--
http
structures from the client point of view.
More or less all the functions wouldn't be enough.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
it it might be worth looking at various approaches to
requirements capture and specification.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.. By the way, some of
the papers referenced seem confused between refrains (which form part
of the verses) and choruses (which are separate musical units).
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
rapid prototyping is up there with the rest of them.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
:\\Documents and Settings\\All Users\\Start
Menu\\Programs\\Programming\\Python 2.5'
but the installer never gave me the chance to choose that.
That woudn't stop me running Pythonw directly from the folder in which
it's installed, though, would it?
--
Tim Rowe
--
http://mail.python.org/mailman
a particular structure for the start menu, and fails
to install shortcuts if it doesn't find that structure? I'm used to
programs asking me where they want to put the shortcuts, and creating
folders if they don't find them (creating *without* asking would, of
course, a Hostile Act).
--
Tim Rowe
--
http
=C:\Documents and Settings\All
Users\StartMenu\Programs\Programming'
Thanks, that looks like just what I need.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
choices for one task are
inappropriate for another. Python is a great tool. So is C#. You /can/
do the same job with either, but the smart move is to choose the one
that is best adapted to the task in hand.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
a DBMS.
Certainly the original poster should read up on database design, or
chances are he'll have a nightmare maintaining referential integrity.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
and
tastes like a duck when roasted, you probably want it to really /be/ a
duck and should go back to inheritance.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
form_pun_relating_to_avoiding_a_high_hazard() method) . Fine. If you
checked for all the members of the class that your code uses, it makes
no difference. ABCs give you a way of doing this, but in their absence
it's a long list of checks. If you /can/ use inheritance then it saves
having to do those checks.
--
Tim Rowe
--
http
2008/11/13 Ben Finney [EMAIL PROTECTED]:
That is not duck typing.
Oh, I'm pretty sure it is. It just isn't /using/ the duck typing in
the way you'd like.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
type checking and early binding,
so we can catch more bius earlier (compile rather than run time?) ;-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
actually /would/ be better. If you can do that, in the
process you will have gathered the evidence you need. If you can't do
that, why are you assuming that Python will be better?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2008/11/27 fel [EMAIL PROTECTED]:
that's a lot of bytes for do your own homework
but thanks, I'll do it.
It also included You haven't defined the issue precisely enough :-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
to cope with whatever they meet once they graduate, or
are we teaching computer programming, in a couple of specific
languages, so that the students will be completely unprepared if they
meet anything else?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
of it in
terms of breaking any sort of backwards compatibility because there is
no backwards ;-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
could make it with
Python. Fun, yes, but no way anything I would consider for code that
is actually going to be /used/ in any way whatsoever!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
2008/12/12 Filip Gruszczyński grusz...@gmail.com:
I don't mean memory, but space in code ;-)
Trying to save printer paper for your listings, then?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
* rate
balance += interest
year += 1
print(Year %s, at %s rate: %s paid, %s in bank. % (year,
rate, interest, balance))
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
)):
if balance threshold:
return rate
return .0
Yes, once it's changed from a dictionary to tuples it becomes easier,
doesn't it? D'oh!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
limits
because it's not making actual transactions. Why would they increase
coupling unneccesarily?
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
thinking about what you would /want/ it to do. What do you think it
will do for invalid or no command line arguments at the moment? Try
it!
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
Unfortunately,
bool('Ruby totally pwn3s Python!')
True
Using Python is not total protection against buggy programs ;-)
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
the need to use an exception for a normal case.
--
Tim Rowe
--
http://mail.python.org/mailman/listinfo/python-list
thing I liked (and I certainly didn't find it elegant, as the
original poster described it). What do you see in it that you think
would be good in Python? Remember, put in too many shortcuts and
you'll end up with code that's as unmaintainable as Perl!
--
Tim Rowe
--
http://mail.python.org/mailman
, 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
2009/1/16 has has.te...@virgin.net:
http://www.alice.org/
Ooh, JavaLikeSyntax.py indeed! Why not PythonLikeSyntax, since
that's apparently what they used!
--
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
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
-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
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
(not the organisation) is
more than a few people.
--
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
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
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
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/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
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
1 - 100 of 151 matches
Mail list logo