r
>> i (or perhaps
>> print (('' if i%3 else 'Fizz') + ('' if i%5 else 'Buzz'))
>> or i to save looking up the precedence rules) ?
>
> Stuff clarity! How about
>
> for i in xrange(1, 101):
> print 'FizzBuzz'[4*(i%3>0):4+4*(i%5<1)] or i
>
> --
> Arnaud
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
With no loop:
i=1
exec"print'FizzBuzz'[4*(i%3>0):4+4*(i%5<1)]or i;i+=1;"*100
max
--
http://mail.python.org/mailman/listinfo/python-list
xample.html
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
castironpi <[EMAIL PROTECTED]> wrote:
> Why can't I write this?
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
Because you don't know how?
max
--
http://mail.python.org/mailman/listinfo/python-list
/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
t; --
> http://mail.python.org/mailman/listinfo/python-list
>
>
It even already exists. There is a binary interface that is
maintained alongside pyglet:
http://code.google.com/p/avbin/
and then ctypes wrapper for that interface in pyglet:
http://code.google.com/p/pyglet/source/browse/
t.com/2008/03/python-unicode-lessons-from-school-of.html
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
This looks great. I have been missing my chm based docs since moving to
Python. This goes a long way.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
/usr/src'
for a in ['dictFoo','dictBar','dictFrotz']:
if not 'srcdir' in a:
a['srcdir'] = '/usr/src'
for a in ['dictFoo','dictBar','dictFrotz']:
a.setdefault('srcdir') = '/usr/src'
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
John Machin skrev:
> On Apr 4, 9:44 am, Max M <[EMAIL PROTECTED]> wrote:
> Ummm ... excessive apostrophes plus bonus gross syntax error, dood.
> Did you try running any of these snippets???
No I just wanted to quickly show different ways to do it.
The dicts in the original
thanks,
>
The second set of examples on the page for decimal doesn't look quite
right.
The first couple of lines:
getcontext().prec = 6 # Decimal('3.0')
Decimal("3.0") # Decimal('3.1415926535')
I would assume that the "
bly, between the
realm and uri that you are providing to the password manager, it isn't
providing a password for the page you want to load. I've had success
just explicitly setting the authorization header, using the method
discussed in the comments on this page:
http://aspn.activestate.
mply gone quiet.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
a feel for the
language.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
e c family of languages where there is a lot more algorithms
due to the low level coding. Memory handling, list, dicts etc. qickly
becomes more like math algorithms than in Python.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
t in the box, but most
of what you need is built in, you just have to do a little work to use
it. See the "Loading and reloading modules" section on this page:
http://effbot.org/librarybook/builtin.htm
max
--
http://mail.python.org/mailman/listinfo/python-list
e dict of functions is a bit safer. You don't risk calling a built in
method on your object . Which you risk doing with something like:
getattr(obj, 'join')
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
note: What you will be doing is a variation of the factory
pattern.
So this search might give you some new ideas:
http://www.google.dk/search?hl=en&q=python+factory+pattern
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
0, 0, 0, 33, 249, 4, 1, 0, 0, 0, 0, 44, 0, 0, 0, 0, 1, 0,
1, 0,
0, 2, 2, 68, 1, 0, 59]
if not transparent:
template[13:16] = self.bytes() # set rgb values
template[22] = 0 # remove transparency
return ''.join(map(chr, template))
if __name__==
Perhaps csound can help with this. It has a lot of midi, realtime and
python stuff.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
an email with the Amazon price in response would be
way easier than typing the isbn into Google or whatever.
max
--
http://mail.python.org/mailman/listinfo/python-list
it on Windows and I found it to be a bore to get real
time midi working.
It would probably be easier now that I am on Linux.
Well I just thought I would mention that it is not dead. Merely middle aged.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://ma
ace. Just use:
"easy_install zope.interface"
And you have interfaces.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
ier interpretation(i.e.,
tell me how I can use python instead of tell me why I should use
python).
The other question might be more like "I already know VBS, what do I
gain by learning python?".
(the answers could be "lots of things, including full applications"
and
ut Python
being broken.
You will probably get better responses if you just state that there are
things you do not understand, and ask why it works that way.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
I'm playing with pyprocessing module and found that it eats lot's of
memory. I've made small test case to show it. I pass ~45mb of data to
worker processes and than get it back slightly modified. At any time
in main process there are shouldn't be no more than two copies of data
(one original data a
projecktzero wrote:
> I think the new site is great. I really don't understand all the nit
> picking that's going on from the armchair web designers.
It's a nice site. It is not ugly, and its easy to navigate.
*much* better than the old site,
--
hilsen/regards
Comparing:
http://www.python.org/
http://www.perl.org/
http://www.java.org/
http://www.ruby-lang.org/en/
http://java.sun.com/
http://www.php.net/
It is pretty easy to see that http://www.python.org/ is both prettier
than the rest, and has a far better structure.
--
hilsen/regards Max M
> What I hoped I could do:
> class Foo:
> def __init__(self,self.x):
> continue
> y=[]
> y.append(Foo(10.0))
> y.append(Foo(110.0))
> y.append(Foo(60.0))
>
> ys=([y[].x])
> y_max=max(y[].x)
> y_min=min(y[].x)
>
> yz=[y[:-1].x-y[1:].x]
Brian Elmegaard wrote:
> "Matt Hammond" <[EMAIL PROTECTED]> writes:
>
>
>>y_max = max([e.x for e in y])
>
>
> Would there be a way to refer back to the e with maximum x, or how
> could I find other attributes of it?
In that case a common idiom is to
udioVideoRecording/HomePage
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
--
http://mail.python.org/mailman/listinfo/python-list
lkFlags - audio-yes):
http://us.pycon.org/zope/talks/talksRoster?year%3Alist=&day%3Alist=&track%3Alist=&title=&authors=&abstract=&flags%3Alist=audio-yes&order=Sequence
Then most presentations with audio has several audio formats you can
download.
--
hilsen/regards
John Salerno wrote:
> Max M wrote:
>
>> abcd wrote:
>>
>>> well actually, the site looked promising...only problem is no talks
>>> have audio, video or handouts available (at least right now).
>>>
>>> oh well.
>>>
>>
>&
;key2'] = 'value 2'
>>> a_hash_is_a_dict['key']
'value'
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
es are bad in programming, whay are they good in
general communication.
"Python Packages" is too obvious perhaps?
When we start using eggs will it then be renamed to "Dairy Shop" or
perhaps "Daisy" to make it obscure? Or the "Chickens Nest"?
Please. If it is
Raja Raman Sundararajan wrote:
> I was wondering if there was any library as reportlab to generate word
> documents.
If you are on Windows, why dont you use word for it? You can call it
from Python.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +
2003, 00:49:11)
>>
>>generator comprehensions are new in 2.4. Try:
>>
>> self._all_states |= set([key[i] for key in probabilities])
>
>
> And sets aren't a builtin in 2.3
>
> try:
> set()
> except NameError:
> import sets
> set = set
I want to access some static (non changing) files from within a module
(e.g icons, style sheets) and distribute them together with the module.
Can I place the inside the module folder? If so, how can I access them?
If not so, what is the best thing to do?
Max
--
http://mail.python.org/mailman
Hi,
I try to use epydoc with reStructuredText.
It works fine, my only problem is that I couldn't figure out
the syntax for links to other methods or classes. Any hints?
Max
P.S: Where is the correct platform for discussing epydoc?
--
http://mail.python.org/mailman/listinfo/python-list
ey combine two brilliant ideas that are hard to do in practice.
"Testing" and "Literate Programming"
In the process it even manages to make both a lot easier.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
t;> 100+1 is 101
False
They don't have the same id. (Think of id as memory adresses.)
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
unction:
def somefunc(val=None):
if val is None:
val = []
do_stuff(val)
Or if None is a possible parameter you can use your own object as a marker::
_marker = []
def somefunc(val=_marker):
if val is marker:
val = []
do_stuff(val)
--
hilsen/regards M
lly don't want to calculate it by myself :-))
It is application specific. So how *do* you want
one-month-ago(31.mar.2006) or one-month-ago(28.feb.2006) to work? No one
can know but you.
--
hilsen/regards Max M, Denmark
http://www.mxm.dk/
IT's Mad Science
Phone: +45 66 11 84 94
Mobile: +45 29 93 42 96
--
http://mail.python.org/mailman/listinfo/python-list
ret
except URLError:
log = logging.getLogger()
log.warn("problem connecting")
raise
thanks,
--
Max Slimmer
--
http://mail.python.org/mailman/listinfo/python-list
data. What gives? Am I doing
something wrong?
Thanks,
Max
--
http://mail.python.org/mailman/listinfo/python-list
I never got a response back from this, but I'm noticing even more odd
behavior, see inline:
On Wed, Sep 30, 2009 at 4:38 PM, Max Lynch wrote:
> Hi.
> I have a RotatingFileHandler for my logging system. I have it set to
> rotate once the file becomes 5MB in size. Here is the co
I'm sure this has been brought up many times, but a quick Googling didn't yield
the decisive results I was hoping for, so I apologize if this has already been
addressed in great detail somewhere else.
I am wondering what the rationale is behind preferring while True over while 1?
For me, it see
>>> 5 in [2, 6, 5]
True
Sent from my iPhone
On Dec 22, 2010, at 20:22, Maurice Shih wrote:
> Dear [email protected],
> Thank you for taking the time to listen to my request. I'm a beginner
> programmer and I se python 2.6. I am making a program that needs a command
> that can check if a
ven taking the right approach by using the fcntl.ioctl
call? The environment is a ubuntu 8.04 distribution. Unfortunately
due to other limitations, I can't use/extend pyserial, though I would
like to.
I appreciate any advice on this matter,
Max
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 8, 11:17 am, Grant Edwards wrote:
> On 2010-04-07, Max Kotasek wrote:
>
> > I'm trying to figure out how to parse the responses fromfcntl.ioctl()
> > calls that modify the serial lines in a way that asserts that the line
> > is now changed.
>
> Two c
r use with Python:
http://www.develer.com/oss/GccWinBinaries
He does note on the page that the MinGW project isn't quite so sure
that GCC 4.x is ready for release.
Max
--
http://mail.python.org/mailman/listinfo/python-list
x27; :u'\u00A0', '¡'
>> :u'\u00A1',
>> '¢':u'\u00A2',
>> ^
You may want to try 2.6. Python 3.1 is not syntax compatible with 2.5
(so the u'' stuff won't work in 3.1):
http://docs.python.org/dev/py3k/whatsnew/3.0.html#removed-syntax
max
--
http://mail.python.org/mailman/listinfo/python-list
ain updates to the status of 1.1.7, it is
headed towards a release. Preliminary tarballs and binaries are
available on effbot.org:
http://effbot.org/downloads/#imaging
http://effbot.org/downloads/#pil
max
--
http://mail.python.org/mailman/listinfo/python-list
g" error then strip
> out any whitespace and append extra ASCII '=' to make its length
> a multiple of 3, then try decoding again. (Or you could just
> repeatedly add one pad character and retry, up to 3 times.)
The length of the encoded string should be a multiple of 4 (as you
state in the second sentence of your post), not a multiple of 3.
max
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Aug 8, 2009 at 12:25 AM, Steven
D'Aprano wrote:
> On Fri, 07 Aug 2009 13:35:26 -0700, Kee Nethery wrote:
>
>
>> > Why exactly is posting an open comment on a bug tracker somehow
>> > inferior to posting an open comment on a wiki?
>>
>> It's a good question and deserves a good answer.
>>
>>
On Thu, Aug 6, 2009 at 2:36 PM, Kee Nethery wrote:
> As someone trying to learn the language I want to say that the tone on this
> list towards people who are trying to learn Python feels like it has become
> anti-newbies.
>
> Learning a new language is difficult enough without seeing other newbie
Calling wget or curl using a subprocess is probably as easy as it is
ugly, I use the wget build from here:
http://gnuwin32.sourceforge.net/packages/wget.htm
max
--
http://mail.python.org/mailman/listinfo/python-list
can handle different bases starts to make a
lot of sense to me:
>>> int('100', 8)
64
>>> int('100', 10)
100
>>> int('100', 16)
256
>>> int('100', 2)
4
>>> int('100', 3)
9
>>> int('100', 36)
1296
max
--
http://mail.python.org/mailman/listinfo/python-list
python+cookbook#v=onepage&q=&f=false
<http://books.google.co.uk/books?id=Q0s6Vgb98CQC&printsec=frontcover&dq=python+cookbook#v=onepage&q=&f=false>
Max
--
http://mail.python.org/mailman/listinfo/python-list
hp files). But still, GNU M4 is
a decent piece of technology.
Agreed. The terror that most people feel when hearing "m4" is because
m4 was associated with sendmail, not because m4 was inherently awful.
It has problems, but you'd only encounter them when doing something
_very_ abs
n Graham's Number but still
inconceivably ginormous.)
You don't even need to go that high. Even a run-of-the-mill googol
(10^100) is far larger than the total number of elementary particles in
the observable Universe.
--
Erik Max Francis && [email protected] && http://w
On 07/20/2012 02:05 AM, Virgil Stokes wrote:
On 20-Jul-2012 10:27, Steven D'Aprano wrote:
The fellow looked relived and said "Oh thank god, I thought you said
*million*!"
How does this relate to the python list?
It's also a seriously old joke.
--
Erik Max Francis
On 07/20/2012 03:28 AM, BartC wrote:
"Erik Max Francis" wrote in message
news:[email protected]...
On 07/20/2012 01:11 AM, Steven D'Aprano wrote:
On Thu, 19 Jul 2012 13:50:36 -0500, Tim Chase wrote:
I'm reminded of Graham's Number, whi
as syntactic significance.
Thank you!
PEP 8 says this is bad form. What do you think?
Where does it say that?
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Jabber erikmaxfrancis
Giampaolo Rodolà wrote:
Il 21 gennaio 2012 22:13, Erik Max Francis ha scritto:
The real reason people still use the `while 1` construct, I would imagine,
is just inertia or habit, rather than a conscious, defensive decision. If
it's the latter, it's a case of being _way_ too defensi
ite a different thing, not simply a Kronecker delta extended to the
reals. Kronecker deltas are used all the time over the reals; for
instance, in tensor calculus. Just because the return values are either
0 or 1 doesn't mean that their use is incompatible over reals (as
integers
onsist of mostly definitions. Modules can
interact with each other, be called recursively, etc., and so at an
arbitrary point saying, "break out of this module" doesn't have a great
deal of meaning.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
There is _never_ no hope left. Remember.
-- Louis Wu
--
http://mail.python.org/mailman/listinfo/python-list
eak".
To me, too -- too bad it doesn't work:
c:\temp>\python32\python early_abort.py
File "early_abort.py", line 7
return
^
SyntaxError: 'return' outside function
Nor should it. There's nothing to return out of.
--
Erik Max Francis && m.
Eric Snow wrote:
On Tue, Jun 14, 2011 at 5:51 PM, Erik Max Francis wrote:
Ethan Furman wrote:
To me, too -- too bad it doesn't work:
c:\temp>\python32\python early_abort.py
File "early_abort.py", line 7
return
^
SyntaxError: 'return' outside funct
lookup where the keys are functions,
and execute the value. Even then, unless there are quite a lot of
cases, this may be overkill.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxf
Chris Angelico wrote:
On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis wrote:
It's quite consistent on which control structures you can break out of --
it's the looping ones.
Plus functions.
No:
>>> def f():
... break
...
File "", line 2
SyntaxError:
Chris Angelico wrote:
On Fri, Jun 17, 2011 at 9:29 AM, Erik Max Francis wrote:
Chris Angelico wrote:
On Fri, Jun 17, 2011 at 8:07 AM, Erik Max Francis wrote:
It's quite consistent on which control structures you can break out of --
it's the looping ones.
Plus functions.
N
`. If you want to
conditionally execute some code, use `if`. If you want to indicate an
exceptional condition, raise an exception.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype eri
t you're
just being difficult.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
Winners are men who have dedicated their whole lives to winning.
-- Woody Hayes
--
http://mail.python.org/mailman/listinfo/python-list
Ian Kelly wrote:
On Thu, Jun 16, 2011 at 7:21 PM, Erik Max Francis wrote:
Neither makes sense. `break` exits out of looping structures, which the
top-level code of a module most certainly is not.
Why does that matter? It seems a bit like arguing that the `in`
keyword can't be use
Ian Kelly wrote:
On Thu, Jun 16, 2011 at 10:24 PM, Erik Max Francis wrote:
True. So let's use `in` to represent breaking out of the top-level code of
a module. Why not, it's not the first time a keyword has been reused,
right?
The point is, if it's not obvious already from
Steven D'Aprano wrote:
On Thu, 16 Jun 2011 22:20:50 -0700, Erik Max Francis wrote:
[...]
Yes, which could be rephrased as the fact that `break` and `continue`
are restricted to looping control structures, so reusing `break` in this
context would be a bad idea. You know, kind of like the
ero sig figures value is ever useful.)
Yes. They're order of magnitude estimates. 1 x 10^6 has one
significant figure. 10^6 has zero.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y
igure would be an order of magnitude estimate only.
These aren't usually done in the "e" scientific notation, but it would
be something like 10^3 (if we assume ^ is exponentiation, not the Python
operator).
c^2 is 9 x 10^16 m^2/s^2 to one significant figure. It's 10^17 m^2/
Mel wrote:
Erik Max Francis wrote:
Chris Angelico wrote:
On Tue, Jun 28, 2011 at 12:56 PM, Steven D'Aprano
wrote:
Zero sig figure: 0
That's not really zero significant figures; without further
qualification, it's one.
Is 0.0 one sig fig or two?
Two.
(Just vaguely curiou
t 2 x 10^-8 kg, or on the order of 10^-8 kg (zero
significant figures). To convert to energy, multiply by c^2. c = 3 x
10^8 m/s, so c^2 = 9 x 10^16 m^2/s^2, or about 10^17 m^2/s^2, so the
Planck energy is on the order of 10^9 J. That's a calculation to zero
significant figures.
--
Mel wrote:
Erik Max Francis wrote:
Mel wrote:
By convention, nobody ever talks about 1 x 9.97^6 .
Not sure what the relevance is, since nobody had mentioned any such thing.
If it was intended as a gag, I don't catch the reference.
I get giddy once in a while.. push things to limits
f.append(obj.__name__)
return obj
__all__ = AllList()
@__all__
def api(): pass
@__all__
def db(): pass
@__all__
def input(): pass
@__all__
def output(): pass
@__all__
def tcl(): pass
Bravo!
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose,
quency. In all bases.
--
Erik Max Francis && [email protected] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 18 N 121 57 W && AIM/Y!M/Skype erikmaxfrancis
They love too much that die for love.
-- (an English proverb)
--
http://mail.python.org/mailman/listinfo/python-list
nan}
{nan}
It's fundamentally because NaN is not equal to itself, by design.
Dictionaries and sets rely on equality to test for uniqueness of keys or
elements.
>>> nan = float("nan")
>>> nan == nan
False
In short, don't do that.
--
Erik Max Francis &&
Albert Hopkins wrote:
On Sun, 2011-05-29 at 00:41 +0100, MRAB wrote:
1.0 == 1.0
True
float("nan") == float("nan")
False
I can't cite this in a spec, but it makes sense (to me) that two things
which are nan are not necessarily the same nan.
It's part of t
Ron Adam wrote:
> When you call a method of an instance, Python translates it to...
>
> leader.set_name(leader, "John")
It actually translates it to
Person.set_name(leader, "John")
--
Erik Max Francis && [EMAIL PROTECTED] && http://ww
; formatting , so I've taken a stab at it:
BOTEC at
http://www.alcyone.com/software/botec/
contains a class called SI which does this formatting (and supports all
SI prefixes).
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA,
research on Google?
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
The people are to be taken in very small doses.
-- Ralph Waldo Emerson
--
http://mail.python.org/mailman/listinfo/python-list
ing if I (and nobody else) answered
his question and just rudely pointed him to Google. But since I
actually answered his question, looks to me like someone just wanted to
stand on his soapbox today.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.co
made him change his mind? When the debates raged over PEP 308,
he seemed pretty dead set against it (at least by proxy) ...
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
a search engine won't be the most
practical way to do research. This was _certainly_ not one of those cases.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
No mistaking / Just
the text, but then discards it. You
meant:
for badWord in badWords:
textToFilter = textToFilter.replace(badWord, '<)!&%(#&)%>')
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 12
Matt Garrish wrote:
> Even if you weren't an incredibly offensive and petulant poster, what makes
> you think anyone would write a script from you?
Because in addition to being offensive and petulant, he's also an idiot.
--
Erik Max Francis && [EMAIL PROTECTED] &
=None): self.value = value
...def get(self): return self.value
...def set(self, value): self.value = value
...
>>> one = Container(1)
>>> myDictionary = {}
>>> myDictionary['a'] = one
>>> myDictionary['b'] = one
>>> myDictionary['b
he pbmplus library, and so forth.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Every human being is a problem in search of a solution.
-- Ashley Montagu
--
http://mail.python.org/mailman/listinfo/python-list
Andy Leszczynski wrote:
> So how does it correspond to other piece of the code:
>
> 2 def notfound(self, pagename):
> 3 return dict(pagename=pagename, data="", new=True)
>
> new is a boolean here?
It comes through as a CGI query.
--
Erik Max Francis
ield 0
x = 1
while True:
yield x
yield -x
x += 1
... which is also not a bad demonstration of how the integers are
countably infinite.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
S
tr.split('_| '), but this gave me:
>
> ['this_NP is_VL funny_JJ']
>
> It is not splitted at all.
Use re.split:
>>> re.split('_| ', s)
['this', 'NP', 'is', 'VL', 'funny', 'JJ']
Madhusudan Singh wrote:
> Thanks. Now, a slightly more complicated question.
>
> Say I have two lists of floats. And I wish to generate a list of floats that
> is a user defined function of the two lists.
result = [sqrt(x**2 + y**2) for x, y in zip(xs, ys)]
--
Erik
chr(x) for x in range(32) + [124])
aNewString = aString.translate(IDENTITY_MAP, BAD_MAP)
Note that ASCII 31 is also a control character (US).
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W &&
401 - 500 of 1012 matches
Mail list logo