cal formulas to implement; I'd
wrap up some C or Fortran code. If I did use Python I'd avoid
implementing lots of formulas in class methods. If I had do this
stuff in a method, and I only had a few formulas, I'd tolerate "self."
for the sake of conformance. If I had many fomulas, I would make
local copies at the top.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
tad slower than Fortran
>
> If the Fortran program turns out to have been broken all along, then
> who cares?
That Fortran code is inherently broken is a pretty asinine thing to
suggest. No one's under the impression that Fortran is a great, all-
purpose language like Python is, but it does what it was designed to
do well. When faced with a numerical problem, it's reasonable to
consider using Fortran (especially knowing you can interface it with
Python).
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
dote: I once did a collision detection using Numeric. It would
take slices out of the data set as it narrowed down the possible
collisions. It actually worked pretty well. But the slicing was
crazy and hard to follow. I rewrote it in C and it was both faster
and more readable.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
am called "tidy". Install it, and run it as a
filter on any HTML you download. "tidy" has invested in it quite a
bit of work understanding common bad HTML and how browsers deal with
it. It would be pointless to duplicate that work in the Python
standard library; let HTMLParse
On Apr 4, 2:43 pm, Robert Kern <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Apr 4, 2:08 pm, John Nagle <[EMAIL PROTECTED]> wrote:
> >> BeautifulSoup can't parse this page usefully at all.
> >> It treats the entire page as a text chunk. It
On Apr 4, 4:55 pm, Robert Kern <[EMAIL PROTECTED]> wrote:
> Carl Banks wrote:
> > On Apr 4, 2:43 pm, Robert Kern <[EMAIL PROTECTED]> wrote:
> >> Carl Banks wrote:
> >>> On Apr 4, 2:08 pm, John Nagle <[EMAIL PROTECTED]> wrote:
> >>>>
IMO. As long you have some
organization, be it with packages or modules, everything's ok. Most
things you have to gain or lose by doing one way or the other are of
minor importance.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ntain those variables)
>
> I was wondering: is there a simpler approach to this?
You could put the computations right in the class, and del the extra
variables when done.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s of A, hence the
> chronological
> order of class creation _might_ have something to do with creating
> acceptable
> or unacceptable mro's.
I doubt it "happens" to work that way. If sorting the bases works in
general, it's probably deliberate.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
> It's understandable that the definition of pop() is confusing in that
> way. It looks like the argument should be a list. As others have
> said, that is not what the brackets mean when the documents show the
> formal definition of a function.
I wonder if the documentation could
e
> key/value pair to the end of items.
Or, maybe, like, you know, you could have two different types that
maintain two different orders?
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
if symbol not in g:
g[symbol] = method()
You'd have to pass a symbol as a string, but that's no big deal.
For local variables you're stuck with trying to catch UnboundLocalError.
There's a way to do it by examining stack frames, but I don't really
re
at OverflowError will not disappear entirely
even in Python 3.
Even if we were to get rid of all OverflowErrors resulting from integer
operations in Python, there are going to be some C extensions--including
some in the Python standard library--that will store 32-bit integers.
Modules such as array and struct will still raise it, and probably other
modules were a long integer sometimes doesn't make sense (socket, for
instance). itertools.count() should work for arbitrary integers, though.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 13 Sep 2007 19:21:08 -0700, James Stroud wrote:
> Carl Banks wrote:
>> On Sep 13, 4:20 pm, James Stroud <[EMAIL PROTECTED]> wrote:
>>> Mark Summerfield wrote:
>>>> - If an item is inserted it is put in the right place (because the
>>>>
round out there for Microsoft to do nothing; they have
clients in many countries they have to please.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ther people using it incorrectly.
>
> As the article points out, when using super(),
>
> you must remember that super does not call your superclass. You must
> be prepared to call any other class's method in the hierarchy and be
> prepared to be called from any othe
on will have an "A ha! I get it now!" moment, and will
finally understand the concept.
or
2b. The person will never get it.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
'm not buying it. Those are gimmicks. Arithmetic operations
should be done with arithmetic operators. The bitwise operators make the
code much less readable, especially to people unfamiliar with this usage.
the-above-pun-was-intended-ly yr's,
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 22 Sep 2007 05:06:42 +, Stargaming wrote:
> On Fri, 21 Sep 2007 23:44:00 -0400, Carl Banks wrote:
>
>> Anyone with me here? (I know the deadline for P3 PEPs has passed; this
>> is just talk.)
>>
>> Not many people are bit-fiddling these days.
>
On Sat, 22 Sep 2007 05:19:42 +, Grant Edwards wrote:
> On 2007-09-22, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>> Anyone with me here? (I know the deadline for P3 PEPs has passed; this
>> is just talk.)
>
> Not me.
>
>> Not many people are bit-fiddling
On Fri, 21 Sep 2007 23:38:38 -0700, Paul Rubin wrote:
> Carl Banks <[EMAIL PROTECTED]> writes:
>> Especially someone like an
>> engineer (in the classical sense), who isn't building versatile
>> software packages, won't need to resort to f
On Sat, 22 Sep 2007 02:32:30 -0700, Paul Rubin wrote:
> Carl Banks <[EMAIL PROTECTED]> writes:
>> That's it, lost me already. You ever see the kinds of programs
>> mechanical engineers write? It isn't software.
>
> They do a lot of number crunching.
On Sat, 22 Sep 2007 12:57:35 +, Grant Edwards wrote:
> On 2007-09-22, Carl Banks <[EMAIL PROTECTED]> wrote:
>> Of course it would be. The reason I mention it is that automatic
>> convertibility is a key factor in whether a change can make it into
>> Python 3.
>
le are going to take the suggestion this personally, maybe
that's reason enough not to bother.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
hoops, now the negative number is suddenly an
option.
Granted, it would be stupid for a program to do that, but it suggests
to me that it's probably a good idea to treat all negative numbers the
same. I.e. if there are any numerical options, then all negative
numbers are treated as options. If there are none, then negative
numbers are treated as numbers.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ive.
>
> A user shouldn't have to go out of their way to know whether what they
> type on a command line will be treated as an option or an argument.
I guess typing
./program --help
is out of the question.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
gned to convert arbitrary code that's lying
around: it's designed to convert a supported subset of Python 2.6+ into
Python 3.0. You'd have to write "transitional Python" to use the tool.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
gned to convert arbitrary code that's lying
around: it's designed to convert a supported subset of Python 2.6+ into
Python 3.0. You'd have to write "transitional Python" to use the tool.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
on't run Windows myself. Did you look
at the Active State distros? Maybe they have one.
And finally, asking on the Blender forums would probably be more helpful.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Sep 29, 7:58 pm, Ben Finney <[EMAIL PROTECTED]>
wrote:
> Carl Banks <[EMAIL PROTECTED]> writes:
> > On Sep 28, 6:19 pm, Ben Finney <[EMAIL PROTECTED]>
> > wrote:
> > > Steven Bethard <[EMAIL PROTECTED]> writes:
> > > > A u
he user. (Personally, I
hate that scripts can recklessly download and install stuff into your
site packages without even asking; seems like a possible security hole
as well.) But it's an option.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s my (i guess) to use the
> from MYCLASES.A import A
>
> which is not what i want, because the big amount of files i will have to
> modify (and im not alones, there is a group of dudes who use this
> MYCLASES)
>
> Im i missing something in that docs you post? Thanks!!
Add these lines in __init__.py:
from MYCLASSES.A import A
from MYCLASSES.B import B
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 4, 4:55 am, Lawrence D'Oliveiro <[EMAIL PROTECTED]
central.gen.new_zealand> wrote:
> In message <[EMAIL PROTECTED]>, Carl Banks wrote:
>
>
>
> > On Wed, 03 Oct 2007 16:46:20 +, JD wrote:
>
> >> I want send my jobs over a whole bunch of mach
fferent and unique ways. I'd love to hear how I can do this in
> Python.
Just define isFeaturePresent() in any class you want. That's all you
have to do; any class that defines this method can be passed to any
function that invokes it, without having to "implement" or &quo
ething.
>
> It is possible to solve this by always importing with the complete
> path like 'one.mod1', even when inside the 'one' directory, but that's
> an error waiting to happen.
I've been doing it for a few years; I haven't had a problem. If
you're concerned, you can add "from __future__ import
absolute_imports" to your files to catch any lapses.
> So how do people solve this? Is there an obvious way that I missed?
>
> I'm thankful for any advice you might provide.
Just keep your main scripts out of the package directories and you'll
be fine.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Oct 10, 9:34 am, [EMAIL PROTECTED] wrote:
> Spring Python (http://springpython.python-hosting.com) offers a
[snip spam]
Too bad your bot can't be bothered to read the post it would have
known the singleton wasn't the problem here.
Carl Banks
--
http://mail.python.org/mai
ne instance? Perhaps
> you should consider the Borg pattern instead.
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531
That wouldn't help. In the OP's case, it would create two borgs. Did
anyone actually read the OP's post? Or is this just an opportunit
haven't?
I read far enough to see that OP had mischaracterized the problem and
that it wasn't a problem with singletons at all; it was a problem with
importing.
And that it would still manifiest itself with borgs.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
se an array or mmap instead.
If you have an upper bound for the total size, then you can reserve
the needed number of bytes.
If you really need a Python string, you might have to resort to a C
solution.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
gt; .
>
> What is the best approach to make a column vector with the name such
> as A B, etc?
Use a dict. dict objects are the main way we map names to objects on
the fly. Simple example:
columns = {}
columns["A"] = [3,7,3,3]
columns["B"] = [4,2,4,2]
Filling in th
ds. For
instance, Mako looks like something I might have used if it had been
around back then.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
an and some C numerical routines. The F2PY package,
which is part of Numpy, does this.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
eople who like C++) calling interface. It could help
bring some unity to your extension code, and maybe get rid of a few
typecasts and simplify function names. But you shouldn't expect anything
like the ability to freely inherit between C++ and Python classes.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ke to hear from folks who've got
> linux distributables of medium to large scale python programs...
Since most Linux systems have Python installed these days, the impetus
isn't quite as strong, even given the issues brought up here.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
el is high :), but all the extra "+1"s and "-1"s that I need when
splicing arrays gets pretty old.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
seems to be the hard way, since you can set the nice value
of the current process (almost) directly:
import os
nice_adder = new_nice - os.nice(0)
os.nice(nice_adder)
But I suppose it could be useful in situations where you need
privleges you don't currently have. E.g.:
os.system("sudo
as to compile regular
expressions every time the program is invoked. What if you could
compile the regexp at, you know, compile time, and marshall the
compiled state? It could speed things up a bit, especially for small,
regexp heavy scripts.
Oh, well, you get the idea. It's not going to happen, but it'd be
cool while not anything crucial.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
marker from ISO 8859-1 would be even less unnecessarily specific, but
> also too obscure.
FYI: The $ sign is used to denote currency in many countries; as a
rule of thumb countties that call their currency "dollars" or "pesos"
use the $. So Mexico, Canada, Australia, much of Latin America, much
of the Pacific, not to mention countries in Africa (Zimbabwe) and Asia
(Singapore).
It's certainly less region-specific than the Euro is.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
#x27;t even do it 1000 times or the number rounds off to 0.0.
> > I tried taking the inverse of these numbers as I go but then
> > it just shoots up to "inf".
>
> Can you explain what it is you're trying to calculate?
Looks pretty obviously to be a calculati
rcise. There's probably quite a
few recipes to do stuff like this in the Python Cookbook (quod
googla).
Also, note that some objects are not bound to any symbols but instead
are referenced by lists or other containers.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
eturn False
return True
On Python 2.5, you could do this:
all(f(x) for x in l)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ption, that being thoroughly OO is a good thing, is
very dubious.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
:
do(somethingElse)
When you need the position of a substring, using the index methods:
i = check.index("something")
index returns an exception of the substring is not there, so no need
to worry about what it returns.
Finally, it really won't kill you to do this:
if check
gular function, but it
could easily have given a special syntax to the length operation (for
instance, $#x).
Do you think that, if the length operation had its own syntax, people
would be saying "No, length shouldn't be an operator, it should be a
method"? I don't think so; len
On Oct 31, 6:29 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 31 Oct 2007 07:59:58 -0700, Carl Banks wrote:
> > Python considers len to be an operator for all intents and purposes.
> > Python chose to spell this operator like a regular
len was
deliberately given a status greater than method calls.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ge like Java needs to resort to hacks
like AspectJ.
Footnote:
(**) One sometimes-effective way to tack behavior onto an existing set
of classes is to derive a new set that multiply inherits from the
existing set and a bunch of mixins with your own behavior. The
approach has drawbacks, but sometimes it works ok, and would be quite
useful in Java.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
I am missing?
Here is the home page for the Debian source package for Python 2.5--it
lists the build dependencies.
http://packages.debian.org/source/etch/python2.5
These dependencies shouldn't be much different for Python 3.0. Be
sure to use dev versions of libraries, the packages should ha
Martin Miller wrote:
> Carl Banks wrote:
> > Because the usage deceptively suggests that it defines a name in the
> > local namespace. Failing may be too strong a word, but I've come to
> > expect a consistent behavior w.r.t. namespaces, which this violates, so
>
Don't know if it's the easiest -- and if "calculate" is a CPU-bound
> number cruncher with no I/O or other OS-blocking calls, it won't be
> faster either as the GIL will only let one run at a time, even on
> multi-core processors.
It could still be helpful if you
x27;s possible to redirect to a device that is a tty,
and sometimes standard I/O streams will not be ttys even without
redirection, such as when run by a script with redirection. (It
shouldn't be a problem, since the main use case is to check whether the
program should run in interactive
ertive, i.e., having it only
work in a special debugging mode. That way people who haven't RTFM
don't use it to make sure their input is correct.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
d as intended (i.e., to claim that a correct program should
always meet the condition), it shouldn't be any more dangerous than
omitting the test altogether.
The danger comes from using it to check for things that aren't
indicative of a bug in the program; for instance, to verify input.
Then t
string representing the bits without having to change it to an
integer first. Check the documentation for the struct module if you
need a certain endianness.
> so How to convert a ieee 754 floating point to raw bits like the java
> api floatToRawBits do?
See documentation for the struct module.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
the
> NumPy manual arrives.
One thing I highly recommend is that you not ignore the Pure Python
stuff. Many of the solutions I gave you here didn't use numpy at all.
Successful usage of the numpy is going to depend a lot on knowing
normal Python. For numerical applications, I suggest you become very
familiar with file I/O, strings and string handling, basic container
types (lists, tuples, dicts, and sets) and the operations they support
(slicing, iteration), and of course, numerics.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Beliavsky wrote:
> Carl Banks wrote:
>
>
>
> > > WRITE(90,*) nfault,npoint
> >
> > Fortran writes this as two arbitrary integers separated by a space.
>
> I wrote a paragraph in my reply explaining why this is wrong.
It's a safe assumption for a
Beliavsky wrote:
> Carl Banks wrote:
>
>
>
> > > A Fortran
> > > list-directed write can print results in an almost arbitrary format,
> > > depending on the compiler. Many compilers will separate integers by
> > > several spaces, not just one, and
use nested functions like I've
shown above, whereas few newbies are likely to use closures. Python
has correctly, IMHO, chosen the way that minimizes surprises for
newbies.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
you have adopted the new ways, because I'd expect Python to
raise TypeError when trying to subclass a function. So you probably
just have a bug.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
dn't pop up often enough to
justify writing a verbose error message in advance, and when it does
trigger you're going to have to print the failed result in a debuging
run anyways.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
re is a bug in the threading module,
not because the user passed it a bad value.
But, yes, it has been done.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 27, 6:51 pm, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> On Sat, 27 Jan 2007 06:58:04 -0800, Carl Banks wrote:
> >> I find that when I detect invalid parameters overtly, I spend less time
> >> debugging.
>
> > If it helps go ahead an use
e
simplest, so I don't see any reason to prefer asynchronous method
unless you're used to it. One Queue for dispatching should be enough
to synchronize everything; maybe a Queue or simple lock at end as well
depending on the need.
The OP might not even care whether it's threaded
On Jan 31, 3:37 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On 31 Jan 2007 12:24:21 -0800, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> >Michele Simionato wrote:
> >> On Jan 31, 5:23 pm, "Frank Potter" <[EMAIL PROTECTED]> wrote:
> >>
On Feb 1, 9:20 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On 1 Feb 2007 06:14:40 -0800, Carl Banks <[EMAIL PROTECTED]> wrote:
>
>
>
> >On Jan 31, 3:37 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> >> On 31 Jan 2007 12:24:2
On Feb 1, 12:40 am, "Michele Simionato" <[EMAIL PROTECTED]>
wrote:
> On Jan 31, 9:24 pm, "Carl Banks" <[EMAIL PROTECTED]> wrote:
>
> > Well, of all the things you can use threads for, this is probably the
> > simplest, so I don't see any reas
ronic, since I myself posted a very simple example of how to do this
with a class hook here on c.l.python a while back.
But I'll have to review the license and see how it works with what I
have.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 7, 10:17 am, "Carl Banks" <[EMAIL PROTECTED]> wrote:
> On Feb 7, 8:51 am, Thomas Heller <[EMAIL PROTECTED]> wrote:
>
>
>
> > Martin v. Löwis schrieb:
>
> > > I'm happy to announce partial 1.0; a module to implement
> >
rreacting due
> to my
> exposure to Zope ...
The big difference from Ruby is that this can't extend most built-
ins. Which means that a lot of Ruby horror stories wouldn't apply.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
quot;
else:
what = "%d cars" % n
print "I saw %s" % what
but what's the point? It's just a few repeated characters two lines
apart. Peter's version is the most easily read version here,
including the one using the official ternary operator.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
xplanation of what BDFL is
> b) shouldn't it mention Linus, Larry Wall, others?[3]
Since when is Larry Wall benevolent? He should be called the SDFL.
:)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 2, 2:14 pm, matthias <[EMAIL PROTECTED]> wrote:
> Here is my question: How do I maintain debug / release builds that
> allow me to switch
> debug stmts, like assert, on / off ?
If you want to distribute a single-file optimized version, perhaps
embedding the Python code as a here-file in a
On Nov 2, 11:22 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Nov 2, 2:14 pm, matthias <[EMAIL PROTECTED]> wrote:
>
> > Here is my question: How do I maintain debug / release builds that
> > allow me to switch
> > debug stmts, like assert, on / off ?
>
&g
On Nov 8, 3:00 pm, Frank Samuelson
<[EMAIL PROTECTED]> wrote:
> I know these ideas are not perfect, but I think they
> may be better... Fire away.
Python isn't Lisp.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
but this'll do for now.)
More generally: your proposals are not "Pythonic", and will get very
little support in the Python community, because the mentality "If it's
good for X, it's good for Y" isn't Pythonic. Python is about a
practical balance of many concerns, and all decisions are considered
from many viewpoints. An argument for consistency for the sake of
keeping things simple is only one of many factors considered.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
which is
written in Python. I find it to be more robust and versatile than GNU
Make for complex builds, though it's a little bit to learn at first.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 12, 2:46 pm, Laszlo Nagy <[EMAIL PROTECTED]> wrote:
> Gabriel Genellina wrote:
> > QOTW: "AOP is a programming paradigm in the same way indie is a genre of
> > film." - Carl Banks
> >http://groups.google.com/group/comp.lang.python/msg/224e922a3e1a8
ered comparisons, not for subset and superset testing.
Unfortunately, the rogue operators are already there and in use, so
the right solution would probably cause more trouble than it would
save at this point. But it'd still cause less trouble than
resurrecting the __cmp__ operator.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ave something like this:
mypet.owner.get_attributes()
you should reverse-refactor it into something like this:
mypet.get_owner_attributes()
I would agree that the former is preferable, especially in cases like
this one where the classes aren't really closely related.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s tricky, error prone, and
defeats the purpose of keeping seperate namespaces.
OTOH, if you find yourself delving several dots deep a lot, it
suggests that you need to refactor you code. Move some of the code
from the shallower classes into the deeper classes, closer to the data
it needs.
Hope this helped and didn't confuse you even more. :) Good luck
learning.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
to
be tacit support from the language for mimicking the proxied classes
in such ways.
I guess for me it would be a judgment call on based how tight I wanted
the proxy class to be--is it being the class, or is it just standing
in?
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
memoized( fib ) :
> print fib.__doc__
> for i in xrange( 36 ) :
>print "n=%d => %d" % (i, fib(i))
> print fib.__doc__
> print fib.__doc__
>
> outputs :
>
> biggus fibbus
> memoized version of function
spe or shoud i use my favorite
> > text editor!
>
> > i used IDLE on windows and it seamd nice. Now i have linux installed on
> > my mashine and boa works, spe wont start, IDLE crashes when compailinfg!
>
> > And if editor is bether choice witch one to use!
>
k the Python 3 effort has done well to keep things from
getting out of hand; I expect transitions to be mostly smooth.
Probably the trickiest aspect of transition will be getting Unicode
and byte strings straight.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
s.
> Even more amazing is the rate C++ is losing
> ground:http://www.tiobe.com/tiobe_index/C__.html
This might be the best of all.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
scripts that (paraphrasing the perl man page) require a bit more
complexity than sed or awk; these sorts of things don't really need
version control. Python is more geared to complex applications, so
version control comes into play a lot more. It's not a surprise that
Python would have more commits then, even back as far as 2000 when
Perl was the shizzle.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
) when
> the new behavior changes only slightly the existing subclass, perhaps
> a simple default option in the subclass's __init__ method would be
> best. Where is the tipping point?
Good question.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 7, 9:36 am, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> On 2007-12-07, Carl Banks <[EMAIL PROTECTED]> wrote:
>
> > On Dec 6, 11:56 am, "Kurt Smith" <[EMAIL PROTECTED]> wrote:
> >> It would seem that there are cases where one would be
> &g
one gets bound to a?
To do something similar in C would require preprocessor macros (ick).
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
class Key(object):
def __init__self):
self.__dict__['props'] = KeyProps()
def __getattr__(self,var):
return getattr(self.props,var)
def __setattr__(self,var,val):
setattr(self.props,var,val)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
401 - 500 of 1709 matches
Mail list logo