[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2021-10-07 Thread sedrubal
Change by sedrubal : -- nosy: +sedrubal ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2019-04-08 Thread Inada Naoki
Inada Naoki added the comment: I concur with Raymond. If you really need this feature, please discuss on python-dev ML. -- nosy: +inada.naoki resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker

[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2018-04-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: There is some virtue to the current design. Having a user explicitly cast to a list will avoid unintentional conversions. -- nosy: +rhettinger ___ Python tracker

[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2018-04-26 Thread Ori Avtalion
Ori Avtalion added the comment: If sets are to be supported, then so should dictionary views. Please also consider the range type. -- nosy: +salty-horse ___ Python tracker

[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2017-08-09 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> bob.ippolito nosy: +bob.ippolito ___ Python tracker ___

[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2017-08-09 Thread Javen O'Neal
set, frozenset, bytearray, and iterators as json arrays type: enhancement versions: Python 3.7 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

Re: Set Frozenset?

2009-03-11 Thread Lie Ryan
R. David Murray wrote: Lie Ryan lie.1...@gmail.com wrote: Matt Nordhoff wrote: Alan G Isaac wrote: Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one

Re: Set Frozenset?

2009-03-10 Thread Lie Ryan
Matt Nordhoff wrote: Alan G Isaac wrote: Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_set).next() I recall a claim that

Re: Set Frozenset?

2009-03-10 Thread Terry Reedy
Lie Ryan wrote: I recall a claim that for result in myset: break is the most efficient way to get one result. I'd never expect that for-loop assignment is even faster than a precreated iter object (the second test)... but I don't think this for-looping variable leaking behavior is

Re: Set Frozenset?

2009-03-10 Thread Paul Rubin
Terry Reedy tjre...@udel.edu writes: I'd never expect that for-loop assignment is even faster than a precreated iter object (the second test)... but I don't think this for-looping variable leaking behavior is guaranteed, isn't it? It is an intentional, documented feature: ... I prefer

Re: Set Frozenset?

2009-03-10 Thread Terry Reedy
Paul Rubin wrote: Terry Reedy tjre...@udel.edu writes: I'd never expect that for-loop assignment is even faster than a precreated iter object (the second test)... but I don't think this for-looping variable leaking behavior is guaranteed, isn't it? It is an intentional, documented feature: ...

Re: Set Frozenset?

2009-03-10 Thread R. David Murray
Lie Ryan lie.1...@gmail.com wrote: Matt Nordhoff wrote: Alan G Isaac wrote: Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use

Re: Set Frozenset?

2009-03-09 Thread Alan G Isaac
Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_set).next() I recall a claim that for result in myset: break is the most

Re: Set Frozenset?

2009-03-09 Thread Matt Nordhoff
Alan G Isaac wrote: Hans Larsen schrieb: How could I take an elemment from a set or a frozenset On 3/8/2009 2:06 PM Diez B. Roggisch apparently wrote: You iterate over them. If you only want one value, use iter(the_set).next() I recall a claim that for result in

Set Frozenset?

2009-03-08 Thread Hans Larsen
Could you help me ? How could I take an elemment from a set or a frozenset .-) ? From a string (unicode? Python3), or from a tuple,or from a list: Element by index or slice. From a dict: by key. But what concerning a set or

Re: Set Frozenset?

2009-03-08 Thread Diez B. Roggisch
Hans Larsen schrieb: Could you help me ? How could I take an elemment from a set or a frozenset .-) ? From a string (unicode? Python3), or from a tuple,or from a list: Element by index or slice. From a dict: by key. But

Re: Set Frozenset?

2009-03-08 Thread Tim Golden
Diez B. Roggisch wrote: Hans Larsen schrieb: Could you help me ? How could I take an elemment from a set or a frozenset .-) ? From a string (unicode? Python3), or from a tuple,or from a list: Element by index or slice. From a dict: by

Re: Set Frozenset?

2009-03-08 Thread Tim Golden
Tim Golden wrote: Diez B. Roggisch wrote: Hans Larsen schrieb: Could you help me ? How could I take an elemment from a set or a frozenset .-) ? From a string (unicode? Python3), or from a tuple,or from a list: Element by index or slice.

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Adam Olsen
status: open title: Allow set/frozenset for __all__ Added file: http://bugs.python.org/file10384/python-importall.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2928 __ ___ Python

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Does this break code that adds to __all__ using append() and extend()? See the os module for an example. -- assignee: - rhettinger nosy: +rhettinger type: - feature request versions: +Python 2.6

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: You don't check for NULL return from PyObject_GetIter(). It will segfault for __all__ = 1. That demonstrates that test cases are missing from the patch. :) Raymond: It shouldn't since __all__ is only inspected after the module code has been

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: The breakage isn't from the patch. The problem would come from using a non-list iterable for __all__ which then breaks any other code that assumes __all__ is a list (the code is os is an example of how __all__ can get modified).

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: I agree. There seems to be no compelling use case. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2928 __ ___ Python-bugs-list

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- resolution: - rejected status: open - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2928 __ ___

[issue2928] Allow set/frozenset for __all__

2008-05-20 Thread Adam Olsen
Adam Olsen [EMAIL PROTECTED] added the comment: tuples are already allowed for __all__, which breaks attempts to monkey-patch it. I did forget to check the return from PyObject_GetIter. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2928