I was surprised recently to discover that BZ2File (at least in 3.7) doesn't
have a name attribute. Is there some fundamental reason name couldn't be
supported, or is it just a bug that it wasn't implemented?
___
Python-Dev mailing list -- python-dev@py
I've been working on a bug in django where if you configure a
logging.handlers.SocketHandler in the django logging config, it gets a
TypeError because it tries to log a HttpRequest object, which can't be pickled.
I'm slowly coming to the conclusion that this isn't a django bug, and the
right f
esult or throws any
thrown exceptions. It doesn't appear that the Awaitable class in Python
has a `result` or `exception` field but `asyncio.Future` does.
Would it make sense to shift from having `await` functions return a `
*Future-like`* return object to returning a Future?
Thanks,
Roy
___
without having to enforce that the DAG is
actually a tree. I can of course write a function to wrap everything in
Futures, but this seems to be against the spirit of async/await.
Thanks,
Roy
On Tue, Dec 15, 2015 at 12:08 PM, Guido van Rossum wrote:
> I think this goes back all the way to a
r manner to other languages implementing async/await and would
remain compatible with existing code using asyncio.
What's your thoughts?
Thanks,
Roy
On Tue, Dec 15, 2015 at 3:35 PM, Kevin Conway
wrote:
> I think there may be somewhat of a language barrier here. OP appears to be
> mixin
/await which is why I found
the existing behavior to be so unintuitive. To Barry and Kevin's point,
this problem is exacerbated by a lack of documentation and examples that
one can follow to learn about the Pythonic approach to async/await.
Thanks,
Roy
On Tue, Dec 15, 2015 at 7:33 PM, Yury Seli
th py.test). With
this patch I'd be able to set the `PYTHON3WARNINGS` environment variable to
ensure I get warnings everywhere.
Thanks, let me know what you think,
Roy
___
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/m
I often want a side_effect of "if called with foo, return bar" functionality.
This is really useful when the order of calls to your mock is indeterminate, so
you can't just use an iterable. What I end up doing is writing a little
function:
def f(x):
data = {
'foo': 'ba
't like writing code that depends on particular
> errno values, because I don't trust it to work cross-
> platform.
I use errno.EEXIST instead of a magic number.
later,
--
Clinton Roy
Software Engineer
Global Change Institute
University of Queensland
humbug.org.au - Brisba
Hi all,
I have a patch for the fileinput.FileInput class, adding a parameter
to the __init__ method called write_mode in order to specify the write
mode when using the class with the inplace parameter set to True.
Before I submit the patch, I've added a test to the test module, and
noticed that t
ow paid sys admin type roles, or are based in
London.
Cheers,
--
Anthony Roy
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
I'd like to learn how Python 3.0 works. I've downloaded the svn.
I am wondering what the best way to learn is:
- Just jump in?
- Or perhaps learn A before B?
- Or maybe there is a tutorial for those new to the internals?
What's the best way to learn how Python
productive way
to proceed?
Roy
On Sat, Dec 13, 2008 at 1:18 PM, Aahz wrote:
> On Sat, Dec 13, 2008, Roy Lowrance wrote:
>>
>> What's the best way to learn how Python 3.0 works?
>
> Post to the correct mailing list. ;-)
>
> Use comp.lang.python or python-tutor o
Hi Jacob,
Will there be GeoDjango/OpenLayers subsprint in the Django sprint?
Thanks,
RHH
On Mon, Feb 9, 2009 at 8:27 PM, Jacob Kaplan-Moss wrote:
> Python-related projects: join the PyCon Development Sprints!
>
> The development sprints are a key part of PyCon, a chance for the contributors
> t
I know that Python has iterator methods called "sorted" and "reversed" and
these are handy shortcuts.
Why not add a new iterator method called "shuffled"?
>>> for x in shuffled(range(5)):
>>>print x
>>> 3
>>> 1
>>> 2
>>> 0
>>> 4
Currently, a person has to do the following because random.sh
While debugging a network algorithm in Python 2.6.2, I encountered
some strange behavior and was wondering whether it has to do with some
sort of code optimization that Python does behind the scenes.
After initialization: defaultdict(, {1: set([1])})
Popping and updating in two steps
On Fri, Dec 11, 2009 at 2:43 PM, MRAB wrote:
> John Arbash Meinel wrote:
>>
>> Roy Hyunjin Han wrote:
>>>
>>> While debugging a network algorithm in Python 2.6.2, I encountered
>>> some strange behavior and was wondering whether it has to do with some
On Fri, Dec 11, 2009 at 7:59 PM, Nick Coghlan wrote:
> It follows the standard left-to-right evaluation order within an expression:
>
> ()
>
> (i.e. a function call always determines which function is going to be
> called before determining any arguments to be passed)
>
> Splitting it into two lin
It would be convenient if replacing items in a dictionary returns the
new dictionary, in a manner analogous to str.replace(). What do you
think?
::
# Current behavior
x = {'key1': 1}
x.update(key1=3) == None
x == {'key1': 3} # Original variable has changed
# Possible behavior
2011/4/29 R. David Murray :
> 2011/4/29 Roy Hyunjin Han :
>> It would be convenient if replacing items in a dictionary returns the
>> new dictionary, in a manner analogous to str.replace()
>
> This belongs on python-ideas, but the short answer is no. The
> general languag
> You can implement this in your own subclass of dict, no?
Yes, I just thought it would be convenient to have in the language
itself, but the responses to my post seem to indicate that [not
returning the updated object] is an intended language feature for
mutable types like dict or list.
class
>> 2011/4/29 Roy Hyunjin Han :
>> It would be convenient if replacing items in a dictionary returns the
>> new dictionary, in a manner analogous to str.replace(). What do you
>> think?
>>
>># Current behavior
>>x = {'key1': 1}
22 matches
Mail list logo