David Barroso dbarro...@dravetech.com writes:
I was wondering if someone could point me in the right direction. I would
like to develop some scripts to manage Cisco routers and switches using
XML. However, I am not sure where to start. Does someone have some
experience working with XML,
Lakshmipathi.G lakshmipath...@gmail.com writes:
We have a server running a web-based terminal emulator (based on shellinabox
for screen-casting check www.webminal.org) that allows users to learn
simple bash commands. This Linux environment secured by things like quota,
selinux,ulimit etc
wow everyone thanks for the feed back! i'll have to rewrite this with
everything you guys taught me. this makes ALOT more sense. :D
--
http://mail.python.org/mailman/listinfo/python-list
On 6 August 2013 20:42, Luca Cerone luca.cer...@gmail.com wrote:
Hi Chris, thanks
Do you ever instantiate any A() objects? You're attempting to call an
unbound method without passing it a 'self'.
I have tried a lot of variations, instantiating the object, creating lambda
functions that
On Tue, Aug 6, 2013 at 7:55 PM, Ben Finney ben+pyt...@benfinney.id.au wrote:
Ian Kelly ian.g.ke...@gmail.com writes:
Terrain that is “radiated” would be terrain that has some kind of spokes
spreading out from its centre. I think you mean “irradiated”.
Hope the game goes well :-)
It's
Hi -
I'm using Python 2.7.3 (Fedora 17) . I tried a simple example with
pexpect to copy a file to remote system. It works
$ cat pex.py
import pexpect
s = pexpect.spawn ('scp pex.py root@10.30.77.244:/tmp')
s.expect ('Password:')
s.sendline ('a')
s.expect(pexpect.EOF,timeout=20)
Execute above
I will start looking to the links and libraries you pointed out. As the
schema definitions are provided by the vendor I think I will go for PyXB.
Thanks!
On Wed, Aug 7, 2013 at 8:00 AM, dieter die...@handshake.de wrote:
David Barroso dbarro...@dravetech.com writes:
I was wondering if
On Tue, Aug 6, 2013 at 6:33 PM, Ethan Furman et...@stoneleaf.us wrote:
class Environment(AutoNumber):
gaia = 2.0
fertile = 1.5
terran = 1.0
jungle = 1.0
ocean = 1.0
arid = 1.0
steppe = 1.0
desert = 1.0
minimal = 1.0
barren = 0.5
tundra = 0.5
I'm trying to create an option for the program to repeat if the user types 'y'
or 'yes', using true and false values, or otherwise end the program. If anyone
could explain to me how to get this code working, I'd appreciate it.
letters='abcdefghijklmn'
batman=True
def thingy():
print('type
Hi Joshua thanks!
I think you might not understand what Chris said.
Currently this does *not* work with Python 2.7 as you suggested it would.
op = map(A.fun,l)
Yeah actually that wouldn't work even in Python 3, since value attribute used
by fun has not been set.
It was my mistake in the
On 7 August 2013 09:17, eschneide...@comcast.net wrote:
I'm trying to create an option for the program to repeat if the user types
'y' or 'yes', using true and false values, or otherwise end the program. If
anyone could explain to me how to get this code working, I'd appreciate it.
Always
the file I want to download is 100 bytes uncompressed, the downloads was
interrupted when 5000 bytes compressed data was transmitted .If I want to
Resuming the HTTP Download ,I wonder what value of the HTTP Range header should
be ,“bytes=5000-“ or “bytes= os.path.getsize(downloadedPart)-”?
the file I want to download is 100 bytes uncompressed, the downloads was
interrupted when 5000 bytes compressed data was transmitted .If I want to
Resuming the HTTP Download ,I wonder what value of the HTTP Range header should
be ,“bytes=5000-“ or “bytes= os.path.getsize(downloadedPart)-”?
Hi -
Thanks for the response. Yes, we used OS features to
restrict the system user accounts.
We don't allow gcc - this helped us to avoid kernel exploits via C code like :
https://www.centos.org/modules/newbb/viewtopic.php?viewmode=flattopic_id=42827forum=59
Sorry. I don't quite get it. As you said, it first tries,
leftOperand.__eq__(rightOperand) then if it returns NotImplemented, it goes
to invoke rightOperand.__eq__(leftOperand). But for any reason, [] == ()
returns false, why?
On Mon, Aug 5, 2013 at 7:06 AM, Chris Angelico ros...@gmail.com
On Wed, Aug 7, 2013 at 10:24 AM, Shiyao Ma i...@introo.me wrote:
Sorry. I don't quite get it. As you said, it first tries,
leftOperand.__eq__(rightOperand) then if it returns NotImplemented, it goes
to invoke rightOperand.__eq__(leftOperand). But for any reason, [] == ()
returns false, why?
On 7 August 2013 09:33, Luca Cerone luca.cer...@gmail.com wrote:
To correct my example:
from multiprocessing import Pool
class A(object):
def __init__(self,x):
self.value = x
def fun(self,x):
return self.value**x
l = range(100)
p = Pool(4)
op = p.map(A(3).fun,
doesn't work neither in Python 2.7, nor 3.2 (by the way I can't use Python
3 for my application).
Are you using Windows? Over here on 3.3 on Linux it does. Not on 2.7 though.
No I am using Ubuntu (12.04, 64 bit).. maybe things changed from 3.2 to 3.3?
from multiprocessing import Pool
2013/8/6 Chris Down ch...@chrisdown.name:
On 2013-08-06 18:38, andrea crotti wrote:
I would really like to do the following:
from lxml import etree as ET
from lxml.builder import E
url = http://something?x=10y=20;
l = E.link(url)
ET.tostring(l) - linkhttp://something?x=10y=20/link
Can someone suggest me better resources for learning sql/sqlite3?
The concepts behind the Structured Query Language haven't changed much
since Edgar Codd first developed them in the 1970s. (He received the
Turing Award in 1981 for this work.)
Building and querying databases is very easy to do
On 7 August 2013 11:10, Luca Cerone luca.cer...@gmail.com wrote:
I can't try it now, I'll let you know later if it works!
(Though just by reading I can't really understand what the code does).
Well,
from multiprocessing import Pool
from functools import partial
class A(object):
def
On 2013-08-07, Ian Kelly ian.g.ke...@gmail.com wrote:
On Tue, Aug 6, 2013 at 7:55 PM, Ben Finney ben+pyt...@benfinney.id.au wrote:
Ian Kelly ian.g.ke...@gmail.com writes:
Terrain that is ?radiated? would be terrain that has some kind of spokes
spreading out from its centre. I think you mean
Hi
I would like to mock patch the attribute 'calc' in the 'Client' class (See code
below).
I have 2 unit tests:
1) test1 - that patch an existing instance of 'Client' - it works fine.
1) test2 - that tries to patch the 'Client' class. My expectation is that
after the patching, every instance
Joshua Landau wrote:
On 7 August 2013 11:10, Luca Cerone luca.cer...@gmail.com wrote:
I can't try it now, I'll let you know later if it works!
(Though just by reading I can't really understand what the code does).
Well,
from multiprocessing import Pool
from functools import partial
On 7 August 2013 15:46, Peter Otten __pete...@web.de wrote:
import copy_reg
import multiprocessing
import new
new is deprecated from 2.6+; use types.MethodType instead of
new.instancemethod.
def make_instancemethod(inst, methodname):
return getattr(inst, methodname)
This is just
Joshua Landau wrote:
On 7 August 2013 15:46, Peter Otten __pete...@web.de wrote:
def make_instancemethod(inst, methodname):
return getattr(inst, methodname)
This is just getattr -- you can replace the two uses of
make_instancemethod with getattr and delete this ;).
D'oh ;)
--
On Tuesday, August 6, 2013 5:14:48 PM UTC-7, MRAB wrote:
On 06/08/2013 23:52, cerr wrote:
Hi,
Why does this code:
#!/usr/bin/python
import urllib2
from binascii import hexlify, unhexlify
host = localhost
uri=/test.php
data
I got it!
It can do like [i for i in x for y in range(2)]
On Wed, Aug 7, 2013 at 4:50 PM, liuerfire Wang liuerf...@gmail.com wrote:
Sorry for the title which didn't make clear.
Here is a list x = [b, a, c] (a, b, c are elements of x. Each of them are
different type). Now I wanna generate a
On 6 August 2013 16:24, gratedme...@gmail.com wrote:
On Monday, August 5, 2013 10:15:30 PM UTC-4, Dave Angel wrote:
gratedme...@gmail.com wrote:
I currently working on a game, where I need to maintain a running tally of
money, as the player makes purchases as they navigate thru game. I
Sorry for the title which didn't make clear.
Here is a list x = [b, a, c] (a, b, c are elements of x. Each of them are
different type). Now I wanna generate a new list as [b, b, a, a, c, c].
I know we can do like that:
tmp = []
for i in x:
tmp.append(i)
tmp.append(i)
However, I wander
liuerfire Wang wrote:
Here is a list x = [b, a, c] (a, b, c are elements of x. Each of them are
different type). Now I wanna generate a new list as [b, b, a, a, c, c].
I know we can do like that:
tmp = []
for i in x:
tmp.append(i)
tmp.append(i)
However, I wander is there a
I have one on my desk at work whose name I can't remember off the
top of my head. I still refer to it from time-to-time. If you'd
like a reference, let me know and I'll check on it at work.
While I think of it:
The Practical SQL Handbook; Using Structured Query Language, by
Bowman, Emerson,
On 08/07/2013 02:24 AM, Shiyao Ma wrote:
Sorry. I don't quite get it. As you said, it first tries,
leftOperand.__eq__(rightOperand) then if it returns
NotImplemented, it goes to invoke rightOperand.__eq__(leftOperand). But for any
reason, [] == () returns false, why?
A list that is empty is
- Mail original -
Hi
I would like to mock patch the attribute 'calc' in the 'Client' class
(See code below).
I have 2 unit tests:
1) test1 - that patch an existing instance of 'Client' - it works
fine.
1) test2 - that tries to patch the 'Client' class. My expectation is
that
Dan Sommers wrote:
while asking for reponse:
while adventuring:
that's a funny way to say `while True:`...
Funny, perhaps, the first time you see it, but way more informative than
the other way to the next one who comes along and reads it.
While I understand that it's
All:
Like most people, I find the whole metaclass topic pretty obscure, and I
have avoided trying to use one for a while. I am also aware of Tim Peter's
famous advice that if you have to ask whether you need a metaclass, then
you almost certainly don't. But in this case I know I am solving a
Terry Reedy wrote:
Code comments :
double and triple spacing code
make it painful to read,
Not for everyone :-)
I prefer mostly double-spaced code
in any language
especially in a 10 line box.
Agree, but the 10 line box
would not be used for routine
On Wed, Aug 7, 2013 at 1:38 PM, Matthew Lefavor mclefa...@gmail.com wrote:
I know that to create the DatabaseField objects I should be using a
descriptor. But I also want the DataSet to automatically gain methods that
will convert it into the expected JSON syntax (e.g., a __specifier__ method
What I wanted to happen is when the user typed something other than 'y' or
'yes' after being asked 'go again?', the batman==False line would cause the
program to stop asking anything and say 'this is the end'. Instead, what is
happening is that the program just keeps going. I figured that after
Thanks for the post.
I actually don't know exactly what can and can't be pickles..
not what partialing a function means..
Maybe can you link me to some resources?
I still can't understand all the details in your code :)
--
http://mail.python.org/mailman/listinfo/python-list
On 7 August 2013 17:59, Peter Otten __pete...@web.de wrote:
liuerfire Wang wrote:
Here is a list x = [b, a, c] (a, b, c are elements of x. Each of them are
different type). Now I wanna generate a new list as [b, b, a, a, c, c].
I know we can do like that:
tmp = []
for i in x:
On 7 August 2013 23:26, Luca Cerone luca.cer...@gmail.com wrote:
Thanks for the post.
I actually don't know exactly what can and can't be pickles..
I just try it and see what works ;).
The general idea is that if it is module-level it can be pickled and
if it is defined inside of something
Thanks for the help Peter!
def make_instancemethod(inst, methodname):
return getattr(inst, methodname)
This is just getattr -- you can replace the two uses of
make_instancemethod with getattr and delete this ;).
D'oh ;)
--
eschneide...@comcast.net wrote:
What I wanted to happen is when the user typed something other than 'y' or
'yes' after being asked 'go again?', the batman==False line would cause the
program to stop asking anything and say 'this is the end'. Instead, what is
happening is that the program
Vito De Tullio wrote:
Dan Sommers wrote:
while asking for reponse:
while adventuring:
that's a funny way to say `while True:`...
Funny, perhaps, the first time you see it, but way more informative than
the other way to the next one who comes along and reads it.
On Thu, Aug 8, 2013 at 6:18 AM, Joshua Landau jos...@landau.ws wrote:
I'm actually posting to point out
http://www.python.org/dev/peps/pep-0448/ would let you write:
[*(item, item) for item in items]
It seems like that it can be only used in python 3.4? I just use python 2.7
because of
On 08/07/2013 01:17 AM, eschneide...@comcast.net wrote:
I'm trying to create an option for the program to repeat if the user types 'y'
or 'yes', using true and false values, or otherwise end the program. If anyone
could explain to me how to get this code working, I'd appreciate it.
Taking a step back, you're probably better off using datetimes. You'll
get all this conversion nonsense for free:
i did:
from time import strftime, time
from datetime import datetime
now = datetime.now()
self.logfile.write('%s\t'%(strftime(%Y-%m-%d,)))
On 08/06/2013 08:38 PM, krismesenbr...@gmail.com wrote:
import random
def room ():
hp = 10
while hp != 0:
random_Number = random.randint(1, 2)
#asking if you want to roll/play
des = input(Would you like to roll the die?)
snip
One very trivial
Never tried this, but if it's not data you're after, but a search term type
of app, then ip address crawl, and if keyword/metadata, then crawl, and
parse, just as it seems you are doing, for keywords, and url's associated
with them, then eliminate url's without that specified keyword parameter
if __name__ == '__main__':
root = tkinter.Tk()
app = MainClass(root) # 'MainClass' depends on the module.
root.mainloop
root.destroy
for REAL you guys...wtf does this even mean lol. what is a boilerplate test
code?
--
http://mail.python.org/mailman/listinfo/python-list
If you permit file I/O and anything that can spawn a process, it is
possible to create a raw binary executable and trigger its execution.
--
Yes,we permit file i/o with quota limits and spawning a process is
allowed upto a limit.
If I'm not wrong, we will be safe if user invokes
Hi
1) I prefer to use start/stop and not the decorator .
2) mock_play is the name of the module where the code belongs
Thanks
Avishay
Sent from my iPhone
On 7 באוג 2013, at 21:01, Jean-Michel Pichavant jeanmic...@sequans.com
wrote:
- Mail original -
Hi
I would like to mock patch the
On 8 August 2013 14:06, snakeinmyboot mikelha...@gmail.com wrote:
for REAL you guys...wtf does this even mean lol. what is a boilerplate test
code?
Did you try at all to find the answer to this yourself?
I ask because it took me only a few seconds to go to wikipedia and
search for
Thomas Guettler added the comment:
Only few people seem to use daemon threads. We do and see this problem often
with Python 2.7.
How difficult is it to get this fixed for 2.7?
Is there a way to work around this problem?
--
nosy: +guettli
___
Antoine Pitrou added the comment:
It seems to me that the more appropriate change here would be to
redefine PyState_FindModule as return a *new* ref rather than a
borrowed ref and have it do the Py_INCREF before returning.
Code using it would then need to add an appropriate Py_DECREF. A
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 3121 Refactoring applied to _csv module
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 3121, 384 refactoring applied to curses_panel module
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 384 Refactoring applied to _csv module
title: PEP 3121 Refactoring - PEP 3121, 384 Refactoring
___
Python tracker rep...@bugs.python.org
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 384 inconsistent with implementation
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
Thomas Guettler added the comment:
There are some examples to work around this for Python2:
http://stackoverflow.com/questions/18098475/detect-interpreter-shut-down-in-daemon-thread
--
nosy: +guettli
___
Python tracker rep...@bugs.python.org
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
___
Alexander Belopolsky added the comment:
Regarding the suggestion of separating PEP3121 and PEP384. It might be true
that datetime and other modules do not benefit directly from PEP 384, however
it is still a fact that the stdlib modules should be seen as a set of reference
modules, that are
New submission from Thomas Guettler:
This is a documentation bug: Since #1856 is not solved for Python2, it needs
to be documented.
Daemon Threads on Python2 can seg fault.
Work arounds:
http://stackoverflow.com/questions/18098475/detect-interpreter-shut-down-in-daemon-thread
--
Alexander Belopolsky added the comment:
With respect to PEP 384 refactoring, I would like to see
Tools/scripts/abitype.py used for most of the conversions. The PEP itself can
probably be amended to advertise this tool more prominently.
--
___
Serhiy Storchaka added the comment:
u'\U000104a2' == u'\ud801\udca2' on narrow build.
u'\ud801'.encode('utf-8', 'surrogatepass') == b'\xed\xa0\x81'
u'\udca2'.encode('utf-8', 'surrogatepass') == b'\xed\xb2\xa2'
Hope it will help.
--
___
Python
M. Dietrich added the comment:
for a logging library the important thing would be to not loose the information
that was meant to log. as i said i do alot of long-running huge-data-processing
scripts in py using the library. if the logging breaks but doesnt log what was
intended to log i judge
Roundup Robot added the comment:
New changeset 698fd628b001 by Eli Bendersky in branch '3.3':
Issue #18668: Properly document setting m_size in PyModuleDef
http://hg.python.org/cpython/rev/698fd628b001
New changeset 9877c25d9556 by Eli Bendersky in branch 'default':
Closing #18668: Properly
Eli Bendersky added the comment:
Thanks for the review!
--
resolution: fixed -
stage: committed/rejected - needs patch
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18668
Changes by Eli Bendersky eli...@gmail.com:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18668
___
Eli Bendersky added the comment:
Antoine, some questions about the patch:
First, I think it omits expat_capi from the state. Is that intentional?
Second, I'm not sure if this approach is fully aligned with PEP 3121. A global,
shared state is still used. Instead of actually having a different
Antoine Pitrou added the comment:
First, I think it omits expat_capi from the state. Is that
intentional?
What would it do in the state? There's nothing to release.
Second, I'm not sure if this approach is fully aligned with PEP 3121.
A global, shared state is still used. Instead of
Nick Coghlan added the comment:
I thought setting m_size to zero was for No per module state, but
reinitialization is fine? Does that not work? (I haven't actually tried it)
--
___
Python tracker rep...@bugs.python.org
Eli Bendersky added the comment:
On Wed, Aug 7, 2013 at 6:28 AM, Antoine Pitrou rep...@bugs.python.orgwrote:
Antoine Pitrou added the comment:
First, I think it omits expat_capi from the state. Is that
intentional?
What would it do in the state? There's nothing to release.
That's
New submission from Zhongyue Luo:
The docstring of methods put() and get() in Queue.py states
get(): If 'timeout' is a positive number, it blocks at most 'timeout' seconds
and raises the Full exception if no free slot was available within that time.
put(): If 'timeout' is a positive number,
Antoine Pitrou added the comment:
That's true, but I thought one of the goals of PEP 3121 is to
separate
states between sub-interpreters. So that one can't corrupt another.
I'm not
sure how much it matters in practice in this case of the pyexpat
capsule;
need to look into it more.
R. David Murray added the comment:
This is more of a documentation issue than a code issue. To be mathematically
precise, the text and error message should read a non-negative value.
Alternatively the text and error could be changed to report that timeout may
not be negative, which would
Vinay Sajip added the comment:
From the line number you mentioned, it looks like you're talking about Python
2.7. However, Python 2.7 is closed to new features: generally speaking, only
bug fixes are supposed to be committed to this branch.
I can consider expanding the Logged from ... error
New submission from Kristján Valur Jónsson:
A proposed patch adds two features to context managers:
1)It has always irked me that it was impossible to assemble nested context
managers in the python language. See issue #5251.
The main problem, that exceptions in __enter__ cannot be properly
Steven Velez added the comment:
This may be a small use case, but a use case none-the less. In my situation, I
am distributing a frozen python package and it runs under the users home
directory. If the user's name has international characters, this will fail.
I expect we will have similar
R. David Murray added the comment:
Your use cases are either already addressed by contextlib.ExitStack, or should
be addressed in the context of its existence. It is the replacement for
contextlib.nested.
--
nosy: +ncoghlan, r.david.murray
___
New submission from Vajrasky Kok:
Both python2 and python3 have this behaviour.
import os; os.getuid()
0
'I am root'
'I am root'
import spwd
spwd.getspnam('bin')
spwd.struct_spwd(sp_nam='bin', sp_pwd='*', sp_lstchg=15558, sp_min=0,
sp_max=9, sp_warn=7, sp_inact=-1, sp_expire=-1,
R. David Murray added the comment:
Ideally, for backward compatibility reasons we really ought to support access
by the old (incorrect) name even in 3.4 (with a deprecation warning, even more
ideally). I'm not sure if that's practical?
--
nosy: +r.david.murray
Kristján Valur Jónsson added the comment:
IMHO, exitstack is not a very nice construct. It's implementation is far
longer than contextlib.nested.
And the chief problem still remains, which has not been addressed until this
patch (as far as I know):
In Python, it is impossible to combine
R. David Murray added the comment:
Raising it on python-ideas sounds like a good idea, then.
I must admit that I don't understand what you mean by combining existing
context managers into a nested one that isn't addressed by ExitStack.
--
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11619
___
___
Python-bugs-list
Kristján Valur Jónsson added the comment:
Simply put, there is no way in the language to nest two context managers, even
though we have full access to their implementation model, i.e. can call
__enter__ and __exit__ manually. This reflects badly (pun intended) on
Python's reflection and
Serhiy Storchaka added the comment:
Seems as Tk stores pasted \U000104a2 as surrogate pair \ud801\udca2. Then
it encoded in UTF-8 as \xed\xa0\x81\xed\xb2\xa2 end passed to Python. Python
converts char* to Unicode object with PyUnicode_FromString() which forbids
invalid UTF-8 including encoded
Antoine Pitrou added the comment:
(and of course, with module states not being PyObjects, we have the same
lifetimes issues as with Py_buffers not being PyObjects)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18674
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file31184/tkinter_string_conv.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file31185/tkinter_string_conv.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
New submission from Derek Wilson:
Escaping strings for serialization or display is a common problem. Currently,
in python3, in order to escape a sting, you need to do this:
'my\tstring'.encode('unicode_escape').decode('ascii')
This would give you a string that was represented like this:
Zhongyue Luo added the comment:
David,
How about like below?
elif timeout sys.float_info.epsilon:
raise ValueError('timeout' must be a positive number)
The docstring has been there for quite a while and IMHO it just doesn't make
sense passing 0.0 as a timeout value.
--
Changes by Richard Oudkerk shibt...@gmail.com:
Added file: http://bugs.python.org/file31186/b3620777f54c.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8713
___
Richard Oudkerk added the comment:
I have done quite a bit of refactoring and added some extra tests.
When I try using the forkserver start method on the OSX Tiger buildbot (the
only OSX one available) I get errors. I have disabled the tests for OSX, but
it seemed to be working before.
New submission from Corey Farwell:
Before someone comes in and tries to correct me, I know Python documentation is
different than Javadocs. It is common to test if the JSON is malformed using a
try...catch. What if I want to catch something more specific than Exception?
The only way a user
Richard Oudkerk added the comment:
IMHO it just doesn't make sense passing 0.0 as a timeout value.
I have written lots of code that looks like
timeout = max(deadline - time.time(), 0)
some_function(..., timeout=timeout)
This makes perfect sense. Working code should not be broken --
Corey Farwell added the comment:
Ideally, this would also be decoumented in json.loads/json.load
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18680
___
R. David Murray added the comment:
In what way does repr(x)[1:-1] not serve your use case?
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18679
___
R. David Murray added the comment:
Exactly. 0 means Don't wait, just raise an error immediately if the queue is
empty/full.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
1 - 100 of 116 matches
Mail list logo