Hi all,
also released pytest-xdist-1.11 with some little improvements
and speedups regarding overheads for distributing tests
(maybe 10%, not too much).
Install it with:
pip install -U pytest-xdist
and checkout the pypi page:
https://pypi.python.org/pypi/pytest-xdist
best,
holger
Just released tox-1.7.0 (finally), the generic virtualenv-based test runner
for Python. It contains a lot of fixes and improvements although there
are some bugs remaining. While a lot of pull requests are thankfully offered
i could use some more co-maintaining/reviewing to allow for some
pytest-2.5.2: fixes, plugin page, contribution guide
===
pytest is a mature Python testing tool with more than a 1000 tests
against itself, passing on many different interpreters and platforms.
The 2.5.2 release fixes a
Hi all,
just released execnet-1.2, the tool for writing distributed zero-install
python programs. The release contains lots of improvements and fixes.
Most notably execnet now supports to use gevent/eventlet models on each of
the initiating side and the remote side (configurable separately).
Django Weekend Cardiff https://djangoweekend.org/ is completely sold
out.
Our open day remains open however, and you're invited to attend the
numerous talks, tutorials and demonstrations in the programme. They'll
all be held at Cardiff University.
Le jeudi 30 janvier 2014 04:27:54 UTC+1, Chris Angelico a écrit :
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack at 0degC is much more painful
than one
at room temperature G
It's the 21st century; you should be
On 1/29/2014 11:16 PM, Ben Finney wrote:
Terry Reedy tjre...@udel.edu writes:
On 1/29/2014 6:26 PM, shangonich...@sbcglobal.net wrote:
If I launch the Python GUI it opens a Python Shell fine. But as
soon as I try to open a file (including a new file), it closes
the Shell.
This I do
On 1/30/2014 12:13 AM, Gregory Ewing wrote:
Steven D'Aprano wrote:
On Mon, 27 Jan 2014 12:22:22 -0800, Rick Johnson wrote:
Why do we even need an input function anyway if all it is going to do
is read from stdin?
That's not all it does.
What else it does is print a prompt before reading
On 30.01.2014 04:27, Chris Angelico wrote:
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack at 0degC is much more painful
than one
at room temperature G
It's the 21st century; you should be making use of Unicode: 0°C.
I
On Thu, Jan 30, 2014 at 8:49 PM, Christian Heimes christ...@python.org wrote:
On 30.01.2014 04:27, Chris Angelico wrote:
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack at 0degC is much more painful
than one
at room temperature
Le jeudi 30 janvier 2014 10:49:11 UTC+1, Christian Heimes a écrit :
On 30.01.2014 04:27, Chris Angelico wrote:
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack at 0degC is much more painful
than one
at room
[Please help spread the word by forwarding to other relevant mailing lists,
user groups, etc.; thanks :-)]
The EuroPython Society (EPS) has started work on preparing the
Call for Participation (CFP) for organizing the EuroPython 2015
conference:
http://www.europython-society.org/
For 2015,
Hello,
I need to randomly access a bzip2 or gzip file. How can I set the offset for a
line and later retreive the line from the file using the offset. Pointers in
this direction will help.
--
https://mail.python.org/mailman/listinfo/python-list
Ayushi Dalmia wrote:
I need to randomly access a bzip2 or gzip file. How can I set the offset
for a line and later retreive the line from the file using the offset.
Pointers in this direction will help.
with gzip.open(filename) as f:
f.seek(some_pos)
print(f.readline())
Hello,
$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more information.
1 0 == True
False
(1 0) == True
True
1 (0 == True)
True
What am I missing here ?
T.
--
https://mail.python.org/mailman/listinfo/python-list
Thibault Langlois schrieb:
1 0 == True
False
What am I missing here ?
This, perhaps:
http://www.primozic.net/nl/chaining-comparison-operators-in-python/
Greetings,
Thomas
--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
--
Thibault Langlois writes:
Hello,
$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more information.
1 0 == True
False
(1 0) == True
True
1 (0 == True)
True
What am I missing here ?
One or both of
On 2014-01-30 08:45, wxjmfa...@gmail.com wrote:
Le jeudi 30 janvier 2014 04:27:54 UTC+1, Chris Angelico a écrit :
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack at 0degC is much more painful
than one
at room temperature G
Ayushi Dalmia ayushidalmia2...@gmail.com Wrote in message:
Hello,
I need to randomly access a bzip2 or gzip file. How can I set the offset for
a line and later retreive the line from the file using the offset. Pointers
in this direction will help.
Start with the zlib module. Note that
Jessica Ross deathwea...@gmail.com Wrote in message:
I found something like this in a StackOverflow discussion.
def paradox():
... try:
... raise Exception(Exception raised during try)
... except:
... print Except after try
... return True
...
Jussi Piitulainen wrote:
Thibault Langlois writes:
Hello,
$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more information.
1 0 == True
False
(1 0) == True
True
1 (0 == True)
True
What am I
Peter Otten writes:
Jussi Piitulainen wrote:
Thibault Langlois writes:
Hello,
$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more information.
1 0 == True
False
(1 0) == True
True
1 (0
I want to add a path to sys.path based upon a variable
Can I do that?
Hardcodeing the path works fine, but I want to set it based upon a variable.
I know I can set PYTHONPATH, but just wondering if I can add a directory on the
fly to sys.path using a variable
--
On 30/01/2014 12:39, loial wrote:
I want to add a path to sys.path based upon a variable
Can I do that?
Hardcodeing the path works fine, but I want to set it based upon a
variable.
I know I can set PYTHONPATH, but just wondering if I can add a
directory on the fly to sys.path using a
Thibault Langlois thibault.langl...@gmail.com Wrote in message:
Hello,
$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more information.
1 0 == True
False
(1 0) == True
True
1 (0 == True)
True
What am I
On Thu, Jan 30, 2014 at 11:05 PM, Dave Angel da...@davea.name wrote:
The finally has to happen before any return inside the try or the
except. And once you're in the finally clause you'll finish it
before resuming the except clause. Since it has a return, that
will happen before the
On 2014-01-30 13:02, Chris Angelico wrote:
On Thu, Jan 30, 2014 at 11:05 PM, Dave Angel da...@davea.name wrote:
The finally has to happen before any return inside the try or the
except. And once you're in the finally clause you'll finish it
before resuming the except clause. Since it has a
On Fri, Jan 31, 2014 at 12:11 AM, MRAB pyt...@mrabarnett.plus.com wrote:
One of the reasons that the 'with' statement was added was to prevent
the mistake that you've just done. ;-)
What if the file can't be opened?
Yeah, whoops. The open shouldn't be inside try/finally.
def func():
There is probably an easy solution to this – but I have not found it.
Trying to terminate a literal in a print statement (from the
tutorial).
The literal should be enclosed in double quotes “ “
the initial double quote seems to be OK (if I use a different character it
flags it) but the ending
On Thursday, January 30, 2014 4:20:26 PM UTC+5:30, Ayushi Dalmia wrote:
Hello,
I need to randomly access a bzip2 or gzip file. How can I set the offset for
a line and later retreive the line from the file using the offset. Pointers
in this direction will help.
This is what I have
Not sure if this is exactly what you're asking, but perhaps you want triple
quotes?
print now is the time for all good men ...
now is the time for all good men ...
print '''now is the time for all good men ...'''
now is the time for all good men ...
It's not easy to visually distinguish two
On 2014-01-30 13:26, Peter Clark wrote:
There is probably an easy solution to this – but I have not found it.
Trying to terminate a literal in a print statement (from the tutorial).
The literal should be enclosed in double quotes “ “
the initial double quote seems to be OK (if I use a different
On Thursday, January 30, 2014 12:49:19 PM UTC, Dave Angel wrote:
Thibault Langlois thibault.langl...@gmail.com Wrote in message:
Hello,
$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26)
[GCC 4.7.3] on linux2
Type help, copyright, credits or license for more
Hello everyone;
I want to write NTP client which sends and receives NTP packet to NTP
server and should read the value from one of the four offsets and convert
it to user readable local or GMT time format, I specifically want to know
which offsets should I read in order to get correct timestamp
On Fri, Jan 31, 2014 at 12:34 AM, Ayushi Dalmia
ayushidalmia2...@gmail.com wrote:
where temp.txt is the posting list file which is first written in a
compressed format and then read later.
Unless you specify otherwise, a compressed file is likely to have
sub-byte boundaries. It might not be
On Fri, Jan 31, 2014 at 12:40 AM, Thibault Langlois
thibault.langl...@gmail.com wrote:
The recommendations to student are 1) do not assume True == 1 and do not use
operator chaining.
Not do not use, but do not misuse. Python's operator chaining is
awesome for bounds checking:
if 3 x 20:
On Fri, Jan 31, 2014 at 12:34 AM, Sadia Bashir
11msccssbas...@seecs.edu.pk wrote:
Hello everyone;
I want to write NTP client which sends and receives NTP packet to NTP server
and should read the value from one of the four offsets and convert it to
user readable local or GMT time format, I
Ok, that works fine with the apth hard coded, but I want to do something like
the code below. i.e I am trying to dynamically add a path that is relative to
the path of the current executing python script.
In this case the import fails.
import sys
import os
from os.path import *
In article 3dcdc95d-5e30-46d3-b558-afedf9723...@googlegroups.com,
Thibault Langlois thibault.langl...@gmail.com wrote:
You are right. I should have given some context.
I am looking at this from the perspective of the teacher that has to explain
idiosyncrasies of the language to inexperienced
On Fri, Jan 31, 2014 at 1:03 AM, loial jldunn2...@gmail.com wrote:
In this case the import fails.
import sys
import os
from os.path import *
Not sure why you need that, since you're explicitly naming
os.path.dirname. The base import os shoul cover that for you.
On 30/01/2014 14:03, loial wrote:
Ok, that works fine with the apth hard coded, but I want to do something like
the code below. i.e I am trying to dynamically add a path that is relative to
the path of the current executing python script.
In this case the import fails.
import sys
On Thu, Jan 30, 2014 at 7:26 AM, Peter Clark artomis...@yahoo.co.uk wrote:
There is probably an easy solution to this – but I have not found it.
Trying to terminate a literal in a print statement (from the tutorial).
The literal should be enclosed in double quotes “ “
the initial double
On Fri, Jan 31, 2014 at 1:08 AM, Roy Smith r...@panix.com wrote:
Better than that, do what I do.
1) Assume that you don't have the full operator precedence table
memorized and just parenthesize everything.
Or:
1a) Assume that you don't have the full operator precedence table
memorized and
Idiot that I am...I was not calling the script with the full path !
Thanks for your help
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Jan 30, 2014 at 6:08 AM, Roy Smith r...@panix.com wrote:
1) Assume that you don't have the full operator precedence table
memorized and just parenthesize everything.
2) In cases where the expression is so simple, you couldn't possibly be
wrong, see rule #1.
Also, assume you don't
On Thu, 30 Jan 2014 13:26:16 +, Peter Clark wrote:
There is probably an easy solution to this – but I have not found it.
Trying to terminate a literal in a print statement (from the tutorial).
I don't understand the problem. Perhaps if you show us what you have
tried, and the error you
On Thursday, January 30, 2014 2:08:58 PM UTC, Roy Smith wrote:
In article 3dcdc95d-5e30-46d3-b558-afedf9723...@googlegroups.com,
Thibault Langlois thibault.langl...@gmail.com wrote:
You are right. I should have given some context.
I am looking at this from the perspective of the
In article mailman.6143.1391091519.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Fri, Jan 31, 2014 at 1:08 AM, Roy Smith r...@panix.com wrote:
Better than that, do what I do.
1) Assume that you don't have the full operator precedence table
memorized and just
Roy Smith writes:
In article 3dcdc95d-5e30-46d3-b558-afedf9723...@googlegroups.com,
Thibault Langlois wrote:
You are right. I should have given some context. I am looking at
this from the perspective of the teacher that has to explain
idiosyncrasies of the language to inexperienced
On Fri, Jan 31, 2014 at 1:49 AM, Roy Smith r...@panix.com wrote:
In article mailman.6143.1391091519.18130.python-l...@python.org,
Chris Angelico ros...@gmail.com wrote:
On Fri, Jan 31, 2014 at 1:08 AM, Roy Smith r...@panix.com wrote:
Better than that, do what I do.
1) Assume that you
30.01.14 13:28, Peter Otten написав(ла):
Ayushi Dalmia wrote:
I need to randomly access a bzip2 or gzip file. How can I set the offset
for a line and later retreive the line from the file using the offset.
Pointers in this direction will help.
with gzip.open(filename) as f:
On Thu, 30 Jan 2014 09:08:58 -0500, Roy Smith wrote:
1) Assume that you don't have the full operator precedence table
memorized and just parenthesize everything.
Oh really? Do you actually write stuff like this?
b = ((2*a) + 1)
if (b = (-1)):
...
I would hope not.
2) In cases where
On Thu, 30 Jan 2014 18:34:04 +0500
Sadia Bashir wrote:
Hello everyone;
I want to write NTP client which sends and receives NTP packet to NTP
server and should read the value from one of the four offsets and convert
it to user readable local or GMT time format, I specifically want to know
On Thu, Jan 30, 2014 at 10:23 AM, Grant Edwards invalid@invalid.invalid wrote:
On 2014-01-30, Christian Heimes christ...@python.org wrote:
On 30.01.2014 04:27, Chris Angelico wrote:
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack
On 2014-01-30, Christian Heimes christ...@python.org wrote:
On 30.01.2014 04:27, Chris Angelico wrote:
On Thu, Jan 30, 2014 at 1:40 PM, MRAB pyt...@mrabarnett.plus.com wrote:
How cruel... I suspect the smack at 0degC is much more painful
than one
at room temperature G
It's the 21st
On 2014-01-30, wxjmfa...@gmail.com wxjmfa...@gmail.com wrote:
The temperature unit is the Kelvin, not the Degree Kelvin.
One writes: 0 K, 275.15 K
And remember to say Kelvins not Kelvin when speaking about
temperatures other than 1 K.
--
Grant Edwards grant.b.edwards
Please reply to the list, rather than to me directly. You can use
Reply to List if you have that option, or Reply to All to make
sure you include the list.
On Thu, Jan 30, 2014 at 8:52 AM, Peter Clark artomis...@yahoo.co.uk wrote:
I do not know how to dump the screen - it will not let me select
On Thursday, January 30, 2014 8:39:03 PM UTC+5:30, Steven D'Aprano wrote:
On Thu, 30 Jan 2014 09:08:58 -0500, Roy Smith wrote:
1) Assume that you don't have the full operator precedence table
memorized and just parenthesize everything.
Oh really? Do you actually write stuff like this?
b
On Thursday, January 30, 2014 4:20:26 PM UTC+5:30, Ayushi Dalmia wrote:
Hello,
I need to randomly access a bzip2 or gzip file. How can I set the offset for
a line and later retreive the line from the file using the offset. Pointers
in this direction will help.
We are not allowed to
Python @ FOSDEM 2014
Hi all,
Last news about the Python devroom at FOSDEM 2014 [1]
Schedule
There is a last change in the schedule, PyPy: a fast Python Virtual
Machine
will replace Web Scraping 101 in Python. Yasoob can't be present in
Belgium :/
Python @ FOSDEM 2014
Hi all,
Last news about the Python devroom at FOSDEM 2014 [1]
Schedule
There is a last change in the schedule, PyPy: a fast Python Virtual
Machine
will replace Web Scraping 101 in Python. Yasoob can't be present in
Belgium :/
Serhiy Storchaka wrote:
30.01.14 13:28, Peter Otten написав(ла):
Ayushi Dalmia wrote:
I need to randomly access a bzip2 or gzip file. How can I set the offset
for a line and later retreive the line from the file using the offset.
Pointers in this direction will help.
with
I was astounded just now to discover that datetime.timedelta doesn't
have a replace() method (at least not in Python 2.7). Is there some
fundamental reason why it shouldn't, or is this just an oversight?
My immediate use case was wanting to print a timedelta without the
fractions of seconds.
On 30/01/2014 14:46, Thibault Langlois wrote:
On Thursday, January 30, 2014 2:08:58 PM UTC, Roy Smith wrote:
In article 3dcdc95d-5e30-46d3-b558-afedf9723...@googlegroups.com,
Thibault Langlois thibault.langl...@gmail.com wrote:
You are right. I should have given some context.
I am
On 30/01/2014 17:32, Roy Smith wrote:
I was astounded just now to discover that datetime.timedelta doesn't
have a replace() method (at least not in Python 2.7). Is there some
fundamental reason why it shouldn't, or is this just an oversight?
My immediate use case was wanting to print a
On 30/01/2014 06:33, Andrew Berg wrote:
On 2014.01.29 23:56, Jessica Ross wrote:
I found something like this in a StackOverflow discussion.
def paradox():
... try:
... raise Exception(Exception raised during try)
... except:
... print Except after try
...
On 2014-01-30, Roy Smith r...@panix.com wrote:
I was astounded just now to discover that datetime.timedelta
doesn't have a replace() method (at least not in Python 2.7).
Is there some fundamental reason why it shouldn't, or is this
just an oversight?
My immediate use case was wanting to
Ayushi Dalmia ayushidalmia2...@gmail.com Wrote in message:
On Thursday, January 30, 2014 4:20:26 PM UTC+5:30, Ayushi Dalmia wrote:
Hello,
I need to randomly access a bzip2 or gzip file. How can I set the offset for
a line and later retreive the line from the file using the offset.
On Thursday, January 30, 2014 9:56:19 AM UTC-5, Jussi Piitulainen wrote:
There's nothing to parenthesize in x = y z = w
Hmm
x = y z = w
File stdin, line 1
SyntaxError: can't assign to comparison
I don't think any number of parentheses will help that :-)
--
On 01/30/2014 10:12 AM, Rotwang wrote:
On 30/01/2014 06:33, Andrew Berg wrote:
On 2014.01.29 23:56, Jessica Ross wrote:
I found something like this in a StackOverflow discussion.
-- def paradox():
... try:
... raise Exception(Exception raised during try)
... except:
...
On Thursday, January 30, 2014 10:09:03 AM UTC-5, Steven D'Aprano wrote:
On Thu, 30 Jan 2014 09:08:58 -0500, Roy Smith wrote:
1) Assume that you don't have the full operator precedence table
memorized and just parenthesize everything.
Oh really? Do you actually write stuff like this?
b
On Thursday, January 30, 2014 10:09:03 AM UTC-5, Steven D'Aprano wrote:
E.g. `x+1 0 and y = 5` is potentially as many as 9 distinct
items to keep in short-term memory. But bracketing some terms
as in `(x+1 0) and (y = 5)` can reduce that down to as few
as two items.
Yes,
On Fri, Jan 31, 2014 at 5:56 AM, Roy Smith r...@panix.com wrote:
On Thursday, January 30, 2014 10:09:03 AM UTC-5, Steven D'Aprano wrote:
E.g. `x+1 0 and y = 5` is potentially as many as 9 distinct
items to keep in short-term memory. But bracketing some terms
as in `(x+1 0) and
Thank-you. Please no-one reply to this post. I just want to put on record my
complete p-offed-ness, that having spent 10 days sorting out and hypertexting a
library of documentation, I now have to start all over.
Please do not respond, I am sure it is all my fault.
Please do not respond - it
On 30/01/2014 12:49, Dave Angel wrote:
[...]
For hysterical reasons, True and False are instances of class
bool, which is derived from int. So for comparison purposes
False==0 and True==1. But in my opinion, you should never take
advantage of this, except when entering obfuscation
On 01/30/2014 11:03 AM, Chris Angelico wrote:
On Fri, Jan 31, 2014 at 5:56 AM, Roy Smith wrote:
Yes, that's probably how I would write that, although, this is even simpler:
(x -1) and (y = 5)
Be careful; that's not the same thing.
How so?
--
~Ethan~
--
Fri, Jan 31, 2014 at 6:22 AM, Ethan Furman et...@stoneleaf.us wrote:
On 01/30/2014 11:03 AM, Chris Angelico wrote:
On Fri, Jan 31, 2014 at 5:56 AM, Roy Smith wrote:
Yes, that's probably how I would write that, although, this is even
simpler:
(x -1) and (y = 5)
Be careful; that's not
Rotwang sg...@hotmail.co.uk Wrote in message:
On 30/01/2014 12:49, Dave Angel wrote:
[...]
For hysterical reasons, True and False are instances of class
bool, which is derived from int. So for comparison purposes
False==0 and True==1. But in my opinion, you should never take
On Fri, Jan 31, 2014 at 7:08 AM, Dave Angel da...@davea.name wrote:
'You have scored %i point%s' % (score, 's'*(score != 1))
Here I'd probably do something like
'You have scored {} {}' .format (score, 'point' if score==1 else
'points')
Bah, what's the fun in that?
'You have scored %i
Roy Smith writes:
On Thursday, January 30, 2014 9:56:19 AM UTC-5, Jussi Piitulainen wrote:
There's nothing to parenthesize in x = y z = w
Hmm
x = y z = w
File stdin, line 1
SyntaxError: can't assign to comparison
I don't think any number of parentheses will help that :-)
On Fri, Jan 31, 2014 at 7:14 AM, Jussi Piitulainen
jpiit...@ling.helsinki.fi wrote:
I don't think any number of parentheses will help that :-)
Er, sorry about that. Here:
x = y z == w
Traceback (most recent call last):
File stdin, line 1, in module
NameError: name 'x' is not defined
On Thu, Jan 30, 2014 at 1:08 PM, Dave Angel da...@davea.name wrote:
Rotwang sg...@hotmail.co.uk Wrote in message:
Really? I take advantage of it quite a lot. For example, I do things
like this:
'You have scored %i point%s' % (score, 's'*(score != 1))
I also did that kind of thing when
On Fri, Jan 31, 2014 at 7:28 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Of course if you're at all concerned about i18n then the proper way to
do it would be:
ngettext(You have scored %d point, You have scored %d points, score) %
score
Ugh, so much duplication! We can totally do better than
On Jan 30, 2014 1:40 PM, Chris Angelico ros...@gmail.com wrote:
On Fri, Jan 31, 2014 at 7:28 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Of course if you're at all concerned about i18n then the proper way to
do it would be:
ngettext(You have scored %d point, You have scored %d points,
On Fri, Jan 31, 2014 at 8:17 AM, Ian Kelly ian.g.ke...@gmail.com wrote:
Why is tuple unpacking limited to the last argument? Is it just for
the parallel with the function definition, where anything following it
is keyword-only?
Lack of a convincing use case, and the position of the following
This is puzzling. (Using Python 2.5, WinXP, Boa Constructor 0.6.1 definitely
running the code through Python 2.5)
If I run these lines in my program, through my IDE (Boa Constructor),
fake_data = ['n/a', 'n/a', 'n/a', 'n/a', '[omitted]', '12']
fake_result = not all(i == '[omitted]'
On Thursday, January 30, 2014 10:09:03 AM UTC-5, Steven D'Aprano wrote:
`(x+1 0) and (y = 5)`
Me:
this is even simpler:
(x -1) and (y = 5)
On Thursday, January 30, 2014 2:03:42 PM UTC-5, Chris Angelico wrote:
Be careful; that's not the same thing.
In what way? I'm assuming x is some
CM wrote:
This is puzzling. (Using Python 2.5, WinXP, Boa Constructor 0.6.1
definitely running the code through Python 2.5)
If I run these lines in my program, through my IDE (Boa Constructor),
fake_data = ['n/a', 'n/a', 'n/a', 'n/a', '[omitted]', '12']
fake_result = not all(i
On Fri, Jan 31, 2014 at 9:09 AM, Roy Smith r...@panix.com wrote:
On Thursday, January 30, 2014 10:09:03 AM UTC-5, Steven D'Aprano wrote:
`(x+1 0) and (y = 5)`
Me:
this is even simpler:
(x -1) and (y = 5)
On Thursday, January 30, 2014 2:03:42 PM UTC-5, Chris Angelico wrote:
Be careful;
On Fri, Jan 31, 2014 at 9:04 AM, CM cmpyt...@gmail.com wrote:
fake_data = ['n/a', 'n/a', 'n/a', 'n/a', '[omitted]', '12']
fake_result = not all(i == '[omitted]' for i in fake_data)
print 'This is fake result: ', fake_result
Trying to get my head around this. You want to see if all
Dear all,
I have a very simple module
glic3@e4200:# cat globalstate.py
GLOBAL = 0
def update():
GLOBAL += 1
however it doesn't work!!
glic3@e4200:# python
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type help, copyright, credits or license for more information.
On Thursday, January 30, 2014 5:14:57 PM UTC-5, Peter Otten wrote:
Hint:
def demo():
... fake_data = ['n/a', 'n/a', 'n/a', 'n/a', '[omitted]', '12']
... fake_result = not all(i == '[omitted]' for i in fake_data)
... print 'This is fake result: ', fake_result
demo()
This
On Fri, Jan 31, 2014 at 9:46 AM, Marc Aymerich glicer...@gmail.com wrote:
GLOBAL = 0
def update():
GLOBAL += 1
If you assign to a name, Python makes it local, unless you explicitly
tell it that you want it to be global:
def update():
global GLOBAL
GLOBAL += 1
But be aware that
On 30/01/2014 22:46, Marc Aymerich wrote:
Dear all,
I have a very simple module
glic3@e4200:# cat globalstate.py
GLOBAL = 0
def update():
GLOBAL += 1
however it doesn't work!!
glic3@e4200:# python
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type help,
On 1/30/14 5:46 PM, Marc Aymerich wrote:
Dear all,
I have a very simple module
glic3@e4200:# cat globalstate.py
GLOBAL = 0
def update():
GLOBAL += 1
however it doesn't work!!
glic3@e4200:# python
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type help, copyright,
On Fri, Jan 31, 2014 at 9:48 AM, CM cmpyt...@gmail.com wrote:
builtin_all = __builtins__.all
but I got the error:
AttributeError: 'dict' object has no attribute 'all'
Try using square brackets notation instead. Apparently your
__builtins__ is a dictionary, not a module, though I don't know
Try using square brackets notation instead. Apparently your
__builtins__ is a dictionary, not a module, though I don't know why
(probably something to do with numpy, which I've never actually used).
But try this:
builtin_all = __builtins__[all]
It might work.
Yes, it does. Thanks!
Che
On Thursday, January 30, 2014 5:25:31 PM UTC-5, Chris Angelico wrote:
On Fri, Jan 31, 2014 at 9:04 AM, CM cmpyt...@gmail.com wrote:
fake_data = ['n/a', 'n/a', 'n/a', 'n/a', '[omitted]', '12']
fake_result = not all(i == '[omitted]' for i in fake_data)
print 'This is fake
http://www.talkorigins.org/
Vs
http://www.trueorigin.org/
WHICH ONE'S TRUE?
This one!:
http://www.trueorigin.org/
--
Thrinaxodon, The Ultimate Defender of USENET
--
https://mail.python.org/mailman/listinfo/python-list
CM wrote:
On Thursday, January 30, 2014 5:14:57 PM UTC-5, Peter Otten wrote:
Hint:
def demo():
... fake_data = ['n/a', 'n/a', 'n/a', 'n/a', '[omitted]', '12']
... fake_result = not all(i == '[omitted]' for i in fake_data)
... print 'This is fake result: ', fake_result
1 - 100 of 191 matches
Mail list logo