, and handle Emacs Lisp objects kept in
Emacs Lisp space.
For more information, see http://pymacs.progiciels-bpi.ca/ . You may
fetch the distribution as one of:
- https://github.com/pinard/Pymacs/tarball/v0.25
- https://github.com/pinard/Pymacs/zipball/v0.25
--
François Pinard http
://pymacs.progiciels-bpi.ca/', and you may
fetch `http://pymacs.progiciels-bpi.ca/archives/Pymacs.tar.gz'.
Report problems and suggestions to `mailto:[EMAIL PROTECTED]'.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Peter Hansen]
>> it only says "Comparison operations are supported by all objects"
>> [...]
>I'm not checking the 2.3.5 version, but that latest one is fairly clear
>on what comparisons on mappings do:
>http://docs.python.org/ref/comparisons.html
Yes,
t not be fully
up-to-date, at least regarding dictionaries.
Would someone know where I could find a confirmation that comparing
dictionaries with `==' has the meaning one would expect (even this is
debatable!), that is, same set of keys, and for each key, same values?
--
François Pinard http://p
[A.M. Kuchling]
>On Tue, 6 Dec 2005 00:05:38 -0500,
> François Pinard <[EMAIL PROTECTED]> wrote:
>> It's a relatively recent phenomenon that maintainers go berzerk, foaming
>> at the mouth over forms, borders, colors, and various other mania! :-)
> It
obarated with maybe a hundred of maintainers, and
corresponded with surely many thousands of users. No doubt it was a lot
of work overall, but at least, communication was easy going (usually).
It's a relatively recent phenomenon that maintainers go berzerk, foaming
at the mouth over forms, b
, why one would ought to stand with such guys? As the room is
full of other interesting people, you happily move on towards them.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
et, but this requires
work and time, and is far from fully automated as one might dream.
While some charsets could be guessed almost correctly by automatic
means, most are difficult to recognise. The whole problem is not easy.
--
François Pinard http://pinard.progiciels-bpi
ly. This is a useful feature of the shell.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
th the trouble.
It might be worth a note in the documentation, somewhere appropriate.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
t may appear as a drawback is the need to
become acquainted with R, the system and the language. But if you
happen to do scientific works, this really is a worth investment.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
tering its keys, this is explicitly forbidden in Python.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
s-bpi.ca/pynits.html
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ew Vim commands to your liking
(presuming you know how to program), writing them in Python.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
imulation system, to tie the advancement control of the various active
ODE solvers within the main loop of the discrete event scheduler.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Wenhua Zhao]
> a = b | 1
> a = b if b != nil
> else a =1
> Is there such expression in python?
Hi. Merely write:
a = b or 1
In Python, there is no `nil'. `a' will receive 1 instead of the value of
`b' only if `b' is either zero, None, False, or empty i
remember having retained the 8601 standard in that study.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
is (or at least once was) fairly fuzzy. But this is theoretical. In
practice, FORTRAN programmers almost never resort to insane use of
whitespace. So you may probably resort to easier, standard two-level
analysis, rather than FORTRAN as formally defined, and still be winning!
--
François Pinard
`T`` you mention is
for only one of them, meant for those cases where embedded spaces are
not acceptable. Other ISO 8601 writings accept embedded spaces, and
this is how ISO 8601 is generally used by people, so far that I can see.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail
`body', and
that's it. Emails are later deleted on entry. The keybinding is known
to the window manager (Openbox here), which launches a small Python
script to update tables for the mail fetcher (another Python script),
and the mail reader (Mutt in my case). All of this is very conveni
does not really need to be further developed,
and does not have much to gain from recent Python releases, I do not see
why it should be released once in a while merely to entertain the crowd.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
the copyright conditions are. This file
also delegates copyright issues to individual files, which are usually
silent on the matter. Could this whole issue be clarified? Or did I
miss something I should not have?
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mail
eeding flames, rather ignore or
merely learn to "killfile" the (happily few) abusers we got.
Enough said for now! Keep happy, all of you. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
comparisons and logical operators on
missing values. My usual convention is that missing values propagate
within booleans and behave like False when tested.
Sometimes, I also need "missing" strings. That's more difficult to
implement, because of the numerous string me
ers
at taking recursion any seriously. This is handicapping somehow, as
recursion could be so useful when properly understood and applied.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
have
been coined later, but the concepts were already there. In computer
science, I often saw old concepts resurrecting with new names, and then
mistaken for recent inventions. New ideas are not so frequent...
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman
titem__' method the way you want.
If I remember well, one of the niceties is that whenever `%(EXPR)s'
is used in a format string, EXPR may be a string (well balanced with
regard to parentheses) which you may then choose to "evaluate", for any
definition of "evaluate" which is fruitful for your application. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
now what they
> are doing). Neither with a digital signature.
Protection against replay is easily guaranteed by sequencing requests,
that is, including a sequence number within the message, each originator
his sequence. A digital signature prevents someone from tampering with
the sequence number with
ght be useful, for someone involved like you are (thanks for all of
us!), that you make a survey of those others, trying to understand why
they failed to acquire popularity, not repeating the same errors if any.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/m
od reputation. Eventually,
> all reputable senders will join the 15%, and the 5% will shrink to
> where we can ignore it.
It's fun to read statistics about a vision! :-)
> >You might find www.spambayes.org of interest, in several ways.
Spambayes is surprisingly good as it
erience, it all goes pretty easily, while staying simple.
However, things related to balancing, finding paths between nodes, or
searching for patterns, etc. may require more work. There are surely
a flurry of tree algorithms out there. What are the actual needs you
have, and would want to see
deally, a work schema
may not be altered (in a non-reentrant way) for a particular plugin.
This is a lesser constraint, because it occurs only occasionally, and I
presume that we could afford unusual stunts whenever necessary.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
way to read read them either.)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Aahz]
> For anything mission-critical, I wouldn't want to rely on a free license.
For anything mission-critical, I wouldn't want to rely on closed sources...
Could the best be open source and non-free license? :-)
--
François Pinard http://pinard.progiciels-bp
ead any
definite assertion against Subversion. Having Perforce better does not
necessarily makes Subversion bad. So my question. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
de Python 2.3, qui ne me satisfait
plutôt bien, mais pas tout-à-fait, avec le module `astng' de Logilab.
Donc, en bref, survole:
http://fp-etc.progiciels-bpi.ca/showfile.html?name=pynits/pynits.txt&mode=vim
pour "sentir" si nos approches ont quelques atomes crochus! :-) Si oui,
get a working solution. Agreed, this
is not all evident, and probably too much of a challenge for a beginner.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
owed the port to be done quickly.
While debugging such a thing, you often loose the keyboard and with it,
the capability of switching terminals, so you have to devise some extra
machinery for restoring the keyboard into a usable state.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Terry Hancock]
> On Friday 22 July 2005 08:09 am, François Pinard wrote:
>
> > [Robert Kern]
> >
> > > One habit that seems to crop up, though, is that I will use '' for
> > > internal strings and "" for strings that will eventually get
nalise a Python program. Not that it occurs that often! :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
on, which is the usual case.
If doc strings are used for BNF snippets, like with SPARK, or any other
machine data, triple-single quotes are mandatory by my own convention.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
+ wz2, zx2 - wy2,
xy2 - wz2, 1. - xx2 - zz2, yz2 + wx2,
zx2 + wy2, yz2 - wx2, 1. - xx2 - yy2)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Robert Kern]
> François Pinard wrote:
> > [Florian Diesch]
> >> Mascyma is (trying to be) a user-friendly graphical frontend for
> >> the Computer Algebra System GNU MAXIMA. It is written in Python
> >> and provides two GUIs, one of which based on PyGTK, the
> > Mascyma is (trying to be) a user-friendly graphical frontend for
> > the Computer Algebra System GNU MAXIMA.
> I was not successful googling for this one. Would you have an URL handy?
Oops, OK! Found it at http://cens.ioc.ee/~pearu/misc/maxima/ .
--
Françoi
ed on wxPython.
I was not successful googling for this one. Would you have an URL handy?
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ploring with some pleasure Bram Moolenaar's A-A-P tool (see
http://www.a-a-p.org). This is implemented in Python, but does not
force people into Python syntax for Makefiles. It might be a nicer
compromise. As usual from Bram, documentation is abundant and useful.
--
François Pinard http://pi
[Rocco Moretti]
> François Pinard wrote:
> > I once worked with a PL/I compiler (on a big IBM mainframe), which was
> > trying to be helpful by spitting pages of:
> > Error SUCH AND SUCH, assuming that THIS AND THIS was meant.
> > and continuing compilation nev
iler (on a big IBM mainframe), which was
trying to be helpful by spitting pages of:
Error SUCH AND SUCH, assuming that THIS AND THIS was meant.
and continuing compilation nevertheless. It was a common joke to say
that PL/I would compile some random valid program out of any garbage!
--
François
e
and comprehensive library, and an interesting community of users. These
probably make most of the difference.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
en the goal is to cut the reference being held in x. Both statements
do it, yet the intent is expressed more legibly by the second.
> (most other languages manage without it).
Hardly an excuse against some good ideas Python has on its own! :-)
--
François Pinard http://pinard.progiciels-bpi.c
t; and arrogant, which is deemed QOTW. :)
Hey! The "question", not the "person"! One might say "the subject",
but then, it has to be the subject of the message, of course! :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ms. It so
seems that `_' is in great demand! :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
oo, bar = gen_tuple(stuff)[:2]
would work better.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ake a local copy of the reference, which was
then accessed faster than the global thing.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ze, my .emacs worked on a lot of systems, Windows included.
> Personally, I find that Lisp & its derivatives put your head in a very
> weird place.
Lisp / Scheme are very OK! Usable for a wide range of applications,
including system' -- with the proper choices, they can be fairly
e of the class. That's seemingly all.
--
[1] I already found out a good while ago, in many other cases unrelated
to this one, but notably in metaclasses, that `self' is often (not
always) clearer than `cls'. Classes are objects, too! :-)
--
François Pinard http:/
German. At the same time, I noticed an increase
of German-written spam filtering through a few lists I'm subscribed to,
and the Python list among others.
Such forged From appears all the time as far as I am concerned, and had
for years now. But something significant happened this weekend.
--
[Paul Rubin]
> François Pinard <[EMAIL PROTECTED]> writes:
>
> > Deep down, why or how not having a [traditional, to-native-code]
> > compiler is a deficiency for CPython? We already know that such a
> > beast would not increase speed so significantly, while usin
s implicitely returned.
A function always have a value. I do not understand the need of "not
returning anything". What do you mean? What is the real need?
> [...] pass don't run too.
`pass' surely runs. However, `pass' is not a `return' statement.
--
bloat size unboudedly.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
airs. Your project is very likely to die if you keep
your sources closed, and yourself loose interest in the project.
Opening your sources is no guarantee either that the community will
adopt your project. But this might give your project a better chance.
--
François Pinard http://pinard
[Martin von Löwis]
> François Pinard wrote:
>
> > Am I looking in the wrong places, or else, should not the standard
> > documentation more handily explain such things?
> It should, but, alas, it doesn't. Contributions are welcome.
My contributions are not that welcom
[Thomas Heller]
> François Pinard <[EMAIL PROTECTED]> writes:
> > [...] given file `question.py' with this contents:
> ># -*- coding: UTF-8 -*-
> >texte = unicode("Fran\xe7ois", 'latin1')
> >print type(texte), repr(text
icode string to a 8-bit string for output, if not through `str()'?
What is missing to the documentation, or to my way of understanding it?
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
or over Emacs) knows about digests.
(Moreover, with not so much trickery, it is Python extensible. I
vaguely remember having written one or two Python backends for Gnus.)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ion. If you want to raise our appetite,
maybe a few words of introduction or explanation would be welcome. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
core. But the result is not good.
Oh, absolutely no chance that such a simple thing would ever work. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
even institutional flamers were getting discouraged by the
lack of fuel, eventually leaving for elswehere. Nice times indeed! :-).
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
.
But who knows! :-)
> [...] and even worse, [bindings] would have to be computed for each
> call, as the prologLikeSum example shows.
Yet, already, as it stands, argument passing in Python is not innocuous.
A bit more, a bit less, nobody would notice! :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[George Sakkis]
> François Pinard wrote:
> > The most useful place for implicit tuple unpacking, in my
> > experience, is likely at the left of the `in' keyword in `for'
> > statements (and it is even nicer when one avoids extraneous
> > parentheses).
>
ikely
at the left of the `in' keyword in `for' statements (and it is even
nicer when one avoids extraneous parentheses).
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Bengt Richter]
> It might also be interesting to keep a running sum of the base 12
> values and use sum % 88 to select piano keys, to let it walk intervals
> outside of a single octave ;-)
The generated would then run from the low octaves to high octaves
monotically, then start over again and ag
n somehow! :-) Easy, as I have a
few Python programs doing various scale computations -- I should try to
bundle these together somewhere in my personal Web site, some day...
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ot;Python has only one way to do it",
rather say "Python will eventually have only one way to do it", and with
such a wording, nobody will not be mislead.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[John J. Lee]
> François Pinard <[EMAIL PROTECTED]> writes:
> [...]
> > Overall, Vim is also cleaner than Emacs, and this pleases me.
> [...]
> Is this still true when comparing XEmacs vs. vim? (rather than
> GNU Emacs vs. vim) I've always used GNU Emacs, but
the editing session.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
all seem more natural to them. If I compare Python
to FORTRAN, COBOL or Assembler, the change is impressive. If I only
could have had something like Python when I started, years ago, and
considering all the work invested, where would I be today! :-)
--
François Pinard http://pinard.progiciel
ue using 1.5.2. [...]
Sure, of course. Yet, our friendly argument is sliding away from was it
originally was. The point was about not asserting in this forum that
Python "has only one way to do it", because this is not true anymore.
The principle has been, it may be back in some distan
of added power and flexibility for almost free, assuming and
given that you already are a Python lover.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
sets could be represented as sorted files of
numbers. Slower, but set operations would also be easy to write.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ment of the ideal?
Many of us are using Python today, week after week, year long. So let's
be pragmatic. Python is what it became and now is. Let's not define it
as a memory from the past nor as a futuristic dream.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
of the Python's ideals.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
the dict you give to `type'.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Hameed Khan]
> and what are new style classes?.
http://www.python.org/2.2.3/descrintro.html
is a good read on this subject.
--
François Pinard http://www.iro.umontreal.ca/~pinard
___
Tutor maillist - Tutor@python.org
http://mail.python.
t members
should filter the list contents on his/her own.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
the confidence we may have in
probabilistic algorithms for the determination of number primality.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Heiko Wundram]
> Replying to oneself is bad, [...]
Not necessarily. :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
on Sorting methods (volume 3). That's long ago, but if I
remember well, Knuth did not consider this as an easy exercise.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
, look at the suite of `xml...' modules.
> cheers, Alex.
P.S. - Your signature and company disclaimer use more than 30 lines.
That's really a lot. I hope you can bring them down to reason! :-)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
ons will
change, but until such changes are announced, I've no reason to doubt
them :-). All in all, `file' is now probably to be considered safer than
`open', despite Guido advises to prefer `open'.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
he times, we know we are opening a file.
`open' is opened (sic!) for some future magic. I prefer to protect my
programs against future magic, until this magic is precisely specified.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
for practical reasons. We got rather far
from the "There is only one way to do it!" that once was Python motto.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
x27; test is
especially appropriate.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
is not a problem!
People sometimes like writing long Python programs. Here is about the
same, a bit shorter: :-)
buffer = file('mybinfile', 'rb').read().replace(oldbinstring, newbinstring)
file('mybinfile', 'wb').write(buffer)
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
but Python not being there, Perl would be quite useful to me.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
oat representation on that machine.
--
François Pinard http://pinard.progiciels-bpi.ca
#!/usr/bin/env python
# Copyright ï 2000 Progiciels Bourbeau-Pinard inc.
# Franïois Pinard <[EMAIL PROTECTED]>, 2000.
def Fraction(num, den=1, tolerance=0):
"""\
Return the _simplest
from within Python. My guess is that it could
very reasonably work, despite requiring almost no development time.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
[Scott David Daniels]
> You can simplify this:
> class Hash(object):
> def __init__(self, **kwargs):
> for key,value in kwargs.items():
> setattr(self, key, value)
Might it be:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
--
Here, the `if' sole-purpose is to indent the "with" block, and so, to
make the whole construct more legible.
--
François Pinard http://pinard.progiciels-bpi.ca
--
http://mail.python.org/mailman/listinfo/python-list
99 matches
Mail list logo