On Jun 18, 7:26 am, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Tue, 17 Jun 2008 09:09:41 -0300, Derek Martin <[EMAIL PROTECTED]>
> escribió:
>
> > On Tue, Jun 17, 2008 at 04:33:03AM -0300, Gabriel Genellina wrote:
> >> > Basically 'a is b' and 'not(a is b)' is similar to 'id(a) == id(b)'
On Jun 18, 12:32 pm, Terry Reedy <[EMAIL PROTECTED]> wrote:
> >> Saying a flat "no" alone, without qualifying your statement is
> >> generally interpreted as rude in English... It's kind of like how you
> >> talk to children when they're too young to understand the explanation.
> >> Yucky.
>
> > I
Hi everybody,
I was wondering if anyone can explain this. My understanding is that 'is'
checks if the object is the same. However, in that case, why this
inconsistency for short strings? I would expect a 'False' for all three
comparisons. This is reproducible across two different machines, so
moreati schrieb:
> Recently I discovered the re module doesn't support POSIX character
> classes:
>
> Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
> [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
import re
r = re
On Jun 18, 3:13 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit :
>
> > Hi. I am looking for a way to check if some given set of (*args,
> > **kwds) conforms to the argument specification of a given function,
> > without
On Jun 18, 2:22 pm, Lie <[EMAIL PROTECTED]> wrote:
>
> I'm not a native English speaker, although I think my parents would
> have liked me to be more straightforward when talking, cause I tend to
> say things like "possibly", "maybe", "probably", and other ambiguous
> expressions to the extent that
On Jun 19, 2:26 am, Faheem Mitha <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I was wondering if anyone can explain this. My understanding is that 'is'
> checks if the object is the same. However, in that case, why this
> inconsistency for short strings? I would expect a 'False' for all three
> c
John Dann <[EMAIL PROTECTED]> writes:
> I suppose there must be some logic in including the start position
> but excluding the end position, though it does escape me for now. I
> can understand making a range inclusive or exclusive but not a
> mixture of the two. Suppose it's just something you ha
> What's the purpose of having list.insert?
It's a convenience function: you don't have to write a loop to move all
items to a later index. Any reformulation of it is easy to get wrong,
and difficult to read.
> One creates tons of unnecessary method calls, the other creates a full
> blown list ob
In article <[EMAIL PROTECTED]>,
> The problem is that using these attributes, I would essentially have
> to re-write the logic python uses when calling a function with a
> given set of arguments. I was hoping there is a way to get at that
> logic without rewriting it.
I don't think there is. I end
On Jun 19, 2:51 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Jun 18, 2:22 pm, Lie <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm not a native English speaker, although I think my parents would
> > have liked me to be more straightforward when talking, cause I tend to
> > say things like "possibly", "
jeremie fouche wrote:
> You can also use :
> self.SomeField = params.has_key("mykey") and params["mykey"] or None
Have caution with this solution: it may not provide the desired result in
the case where params["mykey"] is a false value, such as 0, or []
Jeffrey
--
http://mail.python.org/mailman
On Jun 18, 10:54 am, Matimus <[EMAIL PROTECTED]> wrote:
> On Jun 18, 10:19 am, Robert Dodier <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I'd like to split a string by commas, but only at the "top level" so
> > to speak. An element can be a comma-less substring, or a
> > quoted string, or a su
Michael Ströder wrote:
> Please tell me
> which Python version you're using
We do have one venerable machine here at work using python2.2 with
python-ldap2.0.0pre04. As you can see, we haven't bothered to update either
in quite a while ;-)
> and why it'd be important for you to
> have python-ld
Hi. I'm trying to use NumPy's chararray class for an array of
characters. I notice that when I try to set a chararray element to a
space, it actually gets set to an empty string. I found some pages
online indicating that the chararray strips trailing whitespace from its
values.
On Jun 18, 3:41 pm, [EMAIL PROTECTED] wrote:
> On Jun 18, 3:13 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit :
>
> > > Hi. I am looking for a way to check if some given set of (*args,
> > > **kwds) conforms t
OKB (not okblacke) wrote:
Hi. I'm trying to use NumPy's chararray class for an array of
characters. I notice that when I try to set a chararray element to a
space, it actually gets set to an empty string. I found some pages
online indicating that the chararray strips trailing whitespace
I noticed that in PEP 3105, the PEP about turning print to print(),
the syntax for print() is defined as follows:
def print(*args, sep=' ', end='\n', file=None)
Ignoring the fact that print is a reserved keyword in python, this is
not valid python because extra positional arguments (*args), cannot
On Jun 18, 5:05 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jun 18, 3:41 pm, [EMAIL PROTECTED] wrote:
>
>
>
> > On Jun 18, 3:13 pm, Cédric Lucantis <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > Le Wednesday 18 June 2008 20:19:12 [EMAIL PROTECTED], vous avez écrit :
>
> > > > Hi. I am looking
En Wed, 18 Jun 2008 14:26:31 -0300, Ethan Furman <[EMAIL PROTECTED]>
escribió:
Gabriel Genellina wrote:
(This thread is getting way above 1cp...)
What is 1cp?
cp = centipoise, a unit of dynamic viscosity, measuring the resistence to
flow.
Honey viscosity is a few hundreds, corn
On Jun 18, 5:25 pm, MisterWilliam <[EMAIL PROTECTED]> wrote:
> I noticed that in PEP 3105, the PEP about turning print to print(),
> the syntax for print() is defined as follows:
> def print(*args, sep=' ', end='\n', file=None)
>
> Ignoring the fact that print is a reserved keyword in python, this
I am wondering if it is possible to write advanced listcomprehensions.
For example:
"""Write a program that prints the numbers from 1 to 100. But for
multiples of three print "Fizz" instead of the number and for the
multiples of five print "Buzz". For numbers which are multiples of
both three and
Wow, I was completely wrong about sorted dicts and odicts.
On Jun 17, 4:21 am, [EMAIL PROTECTED] wrote:
> mean. I think for this data structure it's important to keep all the
> normal dict operations at the same speed. If you use a C
Why keep the normal dict operations at the same speed? There is
En Wed, 18 Jun 2008 08:09:58 -0300, A.T.Hofkamp <[EMAIL PROTECTED]>
escribió:
On 2008-06-18, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
picking up 0. On investigation it turned out that the exit value being
read is from python.exe process, not from the Python script. Is there
any way I can
On Wed, 18 Jun 2008 12:57:44 -0700 (PDT), Lie <[EMAIL PROTECTED]> wrote:
> On Jun 19, 2:26 am, Faheem Mitha <[EMAIL PROTECTED]> wrote:
>> Hi everybody,
>>
>> I was wondering if anyone can explain this. My understanding is that 'is'
>> checks if the object is the same. However, in that case, why thi
dbpoko...:
> Why keep the normal dict operations at the same speed? There is a
> substantial cost this entails.
I presume now we can create a list of possible odict usages, because I
think that despite everyone using it for different purposes, we may
find some main groups of its usage. I use odict
En Wed, 18 Jun 2008 18:42:00 -0300, cirfu <[EMAIL PROTECTED]> escribió:
I am wondering if it is possible to write advanced listcomprehensions.
For example:
"""Write a program that prints the numbers from 1 to 100. But for
multiples of three print "Fizz" instead of the number and for the
multipl
Faheem Mitha wrote:
On Wed, 18 Jun 2008 12:57:44 -0700 (PDT), Lie <[EMAIL PROTECTED]> wrote:
On Jun 19, 2:26 am, Faheem Mitha <[EMAIL PROTECTED]> wrote:
Hi everybody,
I was wondering if anyone can explain this. My understanding is that 'is'
checks if the object is the same. However, in that ca
On Jun 18, 9:43 pm, Lie <[EMAIL PROTECTED]> wrote:
> On Jun 19, 2:51 am, Paul McGuire <[EMAIL PROTECTED]> wrote:
>
> > On Jun 18, 2:22 pm, Lie <[EMAIL PROTECTED]> wrote:
>
> > > I'm not a native English speaker, although I think my parents would
> > > have liked me to be more straightforward when t
On Jun 16, 1:37 am, Armin Ronacher <[EMAIL PROTECTED]>
wrote:
> Abstract
>
>
> This PEP proposes an ordered dictionary as a new data structure for
> the ``collections`` module, called "odict" in this PEP for short. The
> proposed API incorporates the experiences gained from working with
>
On Jun 18, 10:42 pm, cirfu <[EMAIL PROTECTED]> wrote:
> I am wondering if it is possible to write advanced listcomprehensions.
>
> For example:
> """Write a program that prints the numbers from 1 to 100. But for
> multiples of three print "Fizz" instead of the number and for the
> multiples of five
On Jun 13, 1:12 pm, jzakiya <[EMAIL PROTECTED]> wrote:
> The paper presents benchmarks with Ruby 1.9.0-1 (YARV). I would love
> to see my various prime generators benchmarked with optimized
> implementations in other languages. I'm hoping Python gurus will do
> better than I, though the methodol
On Jun 18, 4:42 pm, cirfu <[EMAIL PROTECTED]> wrote:
> I am wondering if it is possible to write advanced listcomprehensions.
>
> For example:
> """Write a program that prints the numbers from 1 to 100. But for
> multiples of three print "Fizz" instead of the number and for the
> multiples of five
Hi,
Just wanted to announce a little project I've just uploaded. It's a
web server written in Python. You can get it at http://code.google.com/p/sws-d/
.
Any suggestions or comments are welcome!
Regards,
Sebastian
--
http://mail.python.org/mailman/listinfo/python-list
Hi all,
I have a small python project i am working on. Basically i always have
two threads. A "Read" thread that sits in a loop reading a line at a
time from some input (Usually stdin) and then generating events to be
processed and a "Proc" thread that processes incoming events from a
queue. There
I am starting to build a Python email server. Before assembling the
individual pieces I am wondering if there is a prebuilt package anyone would
recommend?
Thanks in advance for your advice and guidance.
John S.
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 18, 11:01 pm, Kris Kennaway <[EMAIL PROTECTED]> wrote:
> Calvin Spealman wrote:
> > Upload, wait, and google them.
>
> > Seriously tho, aside from using a real indexer, I would build a set of
> > thewordsI'mlookingfor, and then loop over each file, looping over
> > thewordsand doing quick ch
On Jun 18, 3:15 pm, [EMAIL PROTECTED] wrote:
> In Python 2.5 a dict(int:None) needs about 36.2 bytes/element. I am
> suggesting to add 2 pointers, to create a linked list, so it probably
> becomes (on 32 bit systems) about 44.2 bytes/pair.
PyDictEntry is
typedef struct {
Py_ssize_t me_has
En Wed, 18 Jun 2008 21:39:41 -0300, Brendon Costa <[EMAIL PROTECTED]>
escribió:
I have a small python project i am working on. Basically i always have
two threads. A "Read" thread that sits in a loop reading a line at a
time from some input (Usually stdin) and then generating events to be
proc
as a new learner of python,which book in and
is more suitable?
and recommend several books?
thanks
best regards
pase.Y
--
http://mail.python.org/mailman/listinfo/python-list
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On behalf of the Python development team and the Python community, I
am happy to announce the first beta releases of Python 2.6 and Python
3.0.
Please note that these are beta releases, and as such are not suitable
for production environments.
hi...
can someone point me to where/how i would go about calling a ruby app from a
python app, and having the python app being able to get a returned value
from the ruby script.
something like
test.py
a = os.exec(testruby.rb)
testruby.py
foo = 9
return foo
i know this doesn't work... but
Learning Python may be another good choice. But really, for just
starting out, nothing beats online documentation.
http://docs.python.org/tut/tut.html
http://diveintopython.org/
On Jun 18, 9:02Â pm, "yps" <[EMAIL PROTECTED]> wrote:
> as a new learner of python,which book in and
> is more suitab
Thank you everyone. I ended up implementing the dict.get() method, which
seems "cleaner", but I'll keep the (x if y else z) syntax in mind. I
didn't know it existed, I guess it's what I was looking for to begin with.
Thanks again!
Allen wrote:
kretik wrote:
I'm sure this is a popular one, but
On Jun 18, 10:33�pm, "bruce" <[EMAIL PROTECTED]> wrote:
> hi...
>
> can someone point me to where/how i would go about calling a ruby app from a
> python app, and having the python app being able to get a returned value
> from the ruby script.
>
> something like
>
> test.py
> �a = os.exec(testruby.
"yps" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> as a new learner of python,which book in and
> is more suitable?
I don't have "Python in a Nutshell," but let me ask... do you have a strong
programming background in C++, Java, etc.? If so, you'll probably find
"Programming
> I don't know the "standard" way, but perhaps you can get some ideas from
> this recent
> thread:http://groups.google.com/group/comp.lang.python/browse_thread/thread/...
>
I had a quick read through that thread. I think i will need some more
time to think about what they are saying in there thou
I have some code that I am trying to debug (Python 2.5.2 on OSX) using
pdb. However, when the code reaches the pdb.set_trace(), it does not
allow me to view the current line:
> /Users/chris/Research/ISEC/build/bdist.macosx-10.3-i386/egg/pyrl/reinforcement.py(943)__call__()
(Pdb) n
> /Users/chris/R
i want to restrict to user to not enter accents character. si i need
to make an Regular expressions for accents like ó character
--
http://mail.python.org/mailman/listinfo/python-list
Barry Warsaw wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On behalf of the Python development team and the Python community, I am
happy to announce the first beta releases of Python 2.6 and Python 3.0.
As usual, this is the source code release.
A Windows installer built from that co
nazim why you want to use an IDE for gui development as we got a tk
wrapper for python use Tkinter import it in python its easy
--
http://mail.python.org/mailman/listinfo/python-list
I like your programming choice becaz python is safe than c or c++ or
any other compiled languages as it protects against buffer overflow
which causes potentail security problems i am wanted to know how many
requests can it handle is it configurable for that. Raashid
Bhatt (C)
--
http://mail.p
Hello. Im new to using doctests in python. Could some1 tel me how to
use doctests if i have a constructor in my code?
--
http://mail.python.org/mailman/listinfo/python-list
En Thu, 19 Jun 2008 02:08:38 -0300, Sallu <[EMAIL PROTECTED]>
escribió:
i want to restrict to user to not enter accents character. si i need
to make an Regular expressions for accents like ó character
You may enumerate all the allowed characters:
py> allowed_re = re.compile(r"^[A-Za-z0-9 ]*
I tested this a bit more. My windows example was incorrect. It should
have used CTRL_C_EVENT. But even then, the problem is that the process
will also close the console window from which it was called because of
the 0. Also this requires that the process actually have a console and
is not a GUI app
Yaieee!
On Wed, Jun 18, 2008 at 01:32:28AM -0400, Terry Reedy wrote:
> > >Saying a flat "no" alone, without qualifying your statement is
> > >generally interpreted as rude in English...
> As a very much native English speaker I disagree that 'No' is
> necessarily rude.
I never said it was n
101 - 156 of 156 matches
Mail list logo