Re: [Python-ideas] Adding optional parameter to shutil.rmtree to not delete root.

2016-08-25 Thread Nick Jacobson via Python-ideas
clear_dir() is unambiguous. Cheers, Nick. -- Nick Coghlan  |  [email protected]  |  Brisbane, Australia _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] real numbers with SI scale factors

2016-08-29 Thread Mark Lawrence via Python-ideas
, ask what you can do for our language. Mark Lawrence ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] real numbers with SI scale factors

2016-08-29 Thread Mark Lawrence via Python-ideas
ly popular, then it would make a stronger case for incorporation in the core. Stephan Op 29 aug. 2016 2:12 p.m. schreef "Mark Lawrence via Python-ideas" mailto:[email protected]>>: On 29/08/2016 02:44, Ken Kundert wrote: Changing Python so that it understand

[Python-ideas] Context manager for csv module 'reader' and 'DictReader'?

2021-09-05 Thread C. Titus Brown via Python-ideas
CamelCase used in ‘DictReader’. But maybe that’s just an attempt at foolish consistency :). best, —titus ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3

[Python-ideas] Re: Context manager for csv module 'reader' and 'DictReader'?

2021-09-06 Thread C. Titus Brown via Python-ideas
oking for read or readline instead? Codifying that in some standard way could be nice. best, —titus > On Sep 5, 2021, at 5:30 PM, Oscar Benjamin wrote: > > On Mon, 6 Sept 2021 at 01:13, Greg Ewing wrote: >> >> On 6/09/21 3:07 am, C. Titus Brown via Python-ideas wrote: >>

[Python-ideas] PEP-671 thread - let's take a break, please.

2021-12-09 Thread C. Titus Brown via Python-ideas
) ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message

[Python-ideas] 'frozen set' discussion - please consider taking some time off.

2022-01-21 Thread C. Titus Brown via Python-ideas
Hi all, python-ideas moderator here. It’d be great if y’all could take a few days to cool off the frozen set discussion, which is veering off the rails a little bit into emotional language. I’ll keep an eye on it and put emergency moderation into effect if I must, but it’d be nicer if I

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-14 Thread Emin Bugra Saral via Python-ideas
gt;> B), then you can say C > A and C > B, but then you can't say A > B or A < B >>> which breaks sorting. >>> >>> If you want to know if a B inherits from Base, then I think `Base in >>> B.mro()` will cover that just as succinctly. And if you need

[Python-ideas] Re: Comparison operator support (>= and <=) for type

2019-06-18 Thread Emin Bugra Saral via Python-ideas
hat would be a lovely addition. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/p

[Python-ideas] Re: Make `del x` an expression evaluating to `x`

2020-03-12 Thread Ben Rudiak-Gould via Python-ideas
On Thu, Mar 12, 2020 at 2:32 PM Marco Sulla via Python-ideas wrote: > > On Thu, 12 Mar 2020 at 21:22, Chris Angelico wrote: > > They actually ARE already discarded > > 0O > You're right. So *how* can juliantaylor said he measured a speedup of > 2x for large ndar

[Python-ideas] Re: Explicitly defining a string buffer object (aka StringIO += operator)

2020-04-02 Thread C. Titus Brown via Python-ideas
ng it. Good catch from the end. I found another similar at > https://gstindianews.info. But you get the idea - a simple wrapper around > a list is going to be way better than a wrapper around StringIO. i > > jayesh > _______ > Python

[Python-ideas] MODERATOR - in re "Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments"

2020-06-28 Thread C. Titus Brown via Python-ideas
: The code of conduct that governs this list (and all Python spaces) is here, https://www.python.org/psf/conduct/. If you want to discuss the python code of conduct and its applicability to this thread (or anything else), python-ideas is not the place to do so. You may do so privately with the

[Python-ideas] Re: [Python-Dev] Re: Amend PEP-8 to require clear, understandable comments instead of Strunk & White Standard English comments

2020-06-29 Thread C. Titus Brown via Python-ideas
Hi all, as a moderator of python-ideas, I’ve asked postmaster to place python-ideas into emergency moderation. (I do not have the tools to do so myself.) I’m willing to review messages individually as needed. best, —titus > On Jun 29, 2020, at 9:24 AM, Abdur-Rahmaan Janhangeer >

[Python-ideas] Circular Indexing

2020-11-24 Thread Mathew M. Noel via Python-ideas
simply take the remainder when the index is divided by n as the index. Because of the close relationship between finite length sequences and periodic sequences this feature might simplify scientific computing(circular convolution etc). _______ Python-ideas m

[Python-ideas] Circular Indexing and FOR loop minimization

2020-11-24 Thread Mathew M. Noel via Python-ideas
loops when iterating over nD arrays in NumPy. _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived

[Python-ideas] Getting rid of FOR loops and simplifying cicular conviolutions with Circular Indexing

2020-11-25 Thread Mathew M. Noel via Python-ideas
on for cylindrical indexing of 2D and in general nD arrays is offered by the fact that n-dimensional DFT reduces n-dimensional circular convolution to element-wise multiplication. _______ Python-ideas mailing list -- [email protected] To unsubscribe send

[Python-ideas] Re: Getting rid of FOR loops and simplifying cicular conviolutions with Circular Indexing

2020-11-25 Thread Mathew M. Noel via Python-ideas
: [email protected]; [email protected] Subject: Re: [Python-ideas] Getting rid of FOR loops and simplifying cicular conviolutions with Circular Indexing days_of_the_week[14 % 7] There ya go! On Wed, Nov 25, 2020 at 12:51 PM Mathew M. Noel via Python-ideas mailto:[email protected]

[Python-ideas] Re: Getting rid of FOR loops and simplifying cicular convolutions with Circular Indexing

2020-11-26 Thread Mathew M. Noel via Python-ideas
: Mathew M. Noel Cc: python-ideas; [email protected] Subject: Re: [Python-ideas] Getting rid of FOR loops and simplifying cicular conviolutions with Circular Indexing You've started three separate threads to propose something that has exactly zero chance of happening, and would be of

Re: [Python-ideas] PEP 562

2017-09-12 Thread Ionel Cristian Mărieș via Python-ideas
getattr__`` > is called only for missing attributes. > > > References > == > > .. [1] PEP 484 section about ``__getattr__`` in stub files >(https://www.python.org/dev/peps/pep-0484/#stub-files) > > .. [2] The reference imp

Re: [Python-ideas] PEP 562

2017-09-12 Thread Ionel Cristian Mărieș via Python-ideas
s ain't a walk in a park, and there's the boilerplate and the crazy issues with interpreter shutdown. -- Thanks, -- Ionel Cristian Mărieș, http://blog.ionelmc.ro ___________ Python-ideas mailing list [email protected] https://mail.python.org/mai

[Python-ideas] __intancehook__ special method

2017-12-26 Thread Yahya Abou 'Imran via Python-ideas
PositiveInteger(metaclass=MyMeta): @classmethod def __instancehook__(cls, instance): return isinstance(instance, int) and instance > 0 Of course, the real implemention is more detailed... What do you think about that ?___ Python-id

Re: [Python-ideas] __intancehook__ special method

2017-12-26 Thread Yahya Abou 'Imran via Python-ideas
y. Maybe I can make this compatible with it anyway._______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] Make MappingView inherit from Collection instead of Sized

2017-12-29 Thread Yahya Abou 'Imran via Python-ideas
ct, when MappingView inherit from Collection, dict_values is considered as a subclass of Collection since it's in the register of ValuesView, causing the above bug... So, the test have to be changed, and dict_values must be placed in the samples that pass the test, and not in the ones that fail it

[Python-ideas] Change the __repr__ of the `MappingView`s

2017-12-30 Thread Yahya Abou 'Imran via Python-ideas
;/usr/lib/python3.6/_collections_abc.py", line 764, in __iter__ yield self._mapping[key] TypeError: list indices must be integers or slices, not str It's because __init__ in MappingView treat the passed argument -- wich is stored in self._mapping -- as the whole mapping, not jus

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2017-12-30 Thread Yahya Abou 'Imran via Python-ideas
checked during the __subclasshook__ of this ABC to know if a class is a virtual subclass of it or not (when pass as a second argument of issubclass() for example). I don't think it's an error in UML to re-display them since they are abstracts (it would be if they were concretes beca

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2017-12-30 Thread Yahya Abou 'Imran via Python-ideas
Mixin Methods. _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2017-12-30 Thread Yahya Abou 'Imran via Python-ideas
c.png]___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] Improve ABCs _dump_registry() readability

2017-12-30 Thread Yahya Abou 'Imran via Python-ideas
etty weird to me that registry is empty... All the iterators in the cache should've been in the registry instead, should'nt they? _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2017-12-31 Thread Yahya Abou 'Imran via Python-ideas
In the table of the documentation page, the abstract methods are listed fisrt. In the source code, the abstract methods are implemented fisrt. In UML, the convention is to place the abstract methods first. ___________ Python-ideas mailing list Python-ideas@python.

Re: [Python-ideas] Improve ABCs _dump_registry() readability

2017-12-31 Thread Yahya Abou 'Imran via Python-ideas
ll! _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Improve ABCs _dump_registry() readability

2017-12-31 Thread Yahya Abou 'Imran via Python-ideas
's empty: every iterator passed to Iterator.register() defines __iter__ and __next__, so they satisfy Iterator.__subclasshook__ and are added to the cache beforehand. ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-01 Thread Yahya Abou 'Imran via Python-ideas
ragmatic Programmer, Andrew Hunt & David Thomas. Here are the files! I used plantuml. base.puml Description: Binary data full.puml Description: Binary data other_collections.puml Description: Binary data ___ Python-ideas mailing list Python-ideas

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-01 Thread Yahya Abou 'Imran via Python-ideas
also interesting by the way...___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-01 Thread Yahya Abou 'Imran via Python-ideas
nsome going forward or we will simply have to >> drop the image at the first instance of needing to update it because no one >> can or be willing to put in the effort (and I'm thinking in 5 years, not >> soon while we can count on you to help). >> >> On Sat, Dec

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-02 Thread Yahya Abou 'Imran via Python-ideas
ections-abc-uml/blob/master/plantuml/other_collections.svg https://gitlab.com/yahya-abou-imran/collections-abc-uml/blob/master/plantuml/full.svg_______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-02 Thread Yahya Abou 'Imran via Python-ideas
hat it's a lot more work (and pain) than a plain text file. ___________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-02 Thread Yahya Abou 'Imran via Python-ideas
rite to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. . The full text of the GPL is distributed in /usr/share/common-licenses/GPL-3 on Debian systems. _______ Python-ideas mailing list Python-ideas@py

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-02 Thread Yahya Abou 'Imran via Python-ideas
And on the sourceforge page: https://sourceforge.net/projects/plantuml/ License GNU General Public License version 2.0 (GPLv2) ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct

Re: [Python-ideas] Add an UML class diagram to the collections.abc module documentation

2018-01-05 Thread Yahya Abou 'Imran via Python-ideas
don't manage to all agree with each other, I will just let the issue open until somebody comes with an undisputed solution._______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Condu

[Python-ideas] __vars__ special method

2018-01-22 Thread Yahya Abou 'Imran via Python-ideas
attr, value in self.__dict__.items() if not attr.startswith('_')} ___________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] __vars__ special method

2018-01-25 Thread Yahya Abou 'Imran via Python-ideas
amespace you want to expose to your clients without compromosing the real one. Of course, the real one could always be accessible via __dict__ (if present). _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] List the methods of a metaclass in the help of its instances

2018-02-11 Thread Yahya Abou 'Imran via Python-ideas
apply of course._______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] Re: Addition to fnmatch.py

2022-06-05 Thread Eric V. Smith via Python-ideas
gt;> s = set([10, 20, 1]) >>> s {1, 10, 20} You're seeing an accidental byproduct of the implementation. Eric _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] ht

[Python-ideas] Re: default as a keyword argument for dict.get and dict.pop

2022-06-08 Thread Eric V. Smith via Python-ideas
a performance issue with keyword arguments vs. positional. People are touchy when it comes to dicts! Eric _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.

[Python-ideas] Re: PEP 671 (late-bound arg defaults), next round of discussion!

2022-06-17 Thread Eric V. Smith via Python-ideas
;yeah, we said dicts are ordered in 3.6 but you shouldn't count on it, so we're going to make them unordered in 3.7". It would just never happen. That all said, I'm still -1 on this PEP, for reasons I won't rehash. Eric _______

[Python-ideas] Re: Add a line_offsets() method to str

2022-06-18 Thread Eric V. Smith via Python-ideas
n't stop 2.9 through 2.11! Eric _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail

[Python-ideas] Re: Generalized deferred computation in Python

2022-06-22 Thread Eric V. Smith via Python-ideas
very least address in the PEP the fact > that this would close the door on future explicit evaluation models? Every time I’ve looked at this, I come back to: other than the clunky syntax, how is explicit evaluation different from a zero-argument lambda? Eric ___

[Python-ideas] Re: Void type

2022-07-27 Thread Eric V. Smith via Python-ideas
ssible to copy a > signature as is (with functools.wraps() and equivalents). > > ChrisA > ___ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org

[Python-ideas] Re: Allow more flexibility for describing bytes objects.

2022-11-23 Thread Eric V. Smith via Python-ideas
the effort. That would be the beauty of 638: if it's important to one piece of code, it could be just enabled there. Of course the implementing macro would need to be either part of your application or become a dependency. But I'm under no delusions that this PEP will ever get accept

[Python-ideas] Re: Idea: Tagged strings in python

2022-12-17 Thread C. Titus Brown via Python-ideas
> On Dec 17, 2022, at 10:08 AM, [email protected] wrote: > > Bruce Leban wrote: >>> Try googling "python-ideas string prefixes". Doing mimimal diligence is a >>> reasonable expectation before writing up an idea. > > Thanks for the query "stri

[Python-ideas] Re: Idea: Tagged strings in python

2022-12-17 Thread Eric V. Smith via Python-ideas
next possible step > for this feature.) > > *Backwards compatibility* > This syntax currently raises a invalid syntax error. So introducing this > shouldn't break existing programs. Python's currently supported string types > are just single letter, so the suggestion i

[Python-ideas] Re: Idea: Tagged strings in python

2022-12-22 Thread Eric V. Smith via Python-ideas
-CHB -- Christopher Barker, PhD (Chris) Python Language Consulting   - Teaching   - Scientific Software Development   - Desktop GUI and Web Development   - wxPython, numpy, scipy, Cython ___ Python-ideas mailing list -- pyt

[Python-ideas] Re: Deprecate misleading escapes in strings

2023-02-16 Thread Eric V. Smith via Python-ideas
ke non-meaningful backslashes > illegal in string literals' thread[3] could be revived as well, maybe > even with "\f\v" deprecated, "\e" = "\33" introduced and such. > > Please let me know what you think, what else could break, and

[Python-ideas] Re: [dataclasses] add a NON_FIELDS sentinel after which all attributes are ignored.

2023-06-23 Thread Eric V. Smith via Python-ideas
ld attribute. ___ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python

[Python-ideas] Re: [dataclasses] add a NON_FIELDS sentinel after which all attributes are ignored.

2023-06-23 Thread Eric V. Smith via Python-ideas
But without knowing the use case, it's hard to say. Eric _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at http

[Python-ideas] Re: Extract variable name from itself

2023-09-23 Thread Eric V. Smith via Python-ideas
this in editor (see my later e-mails)2. The f-string functionality for it is already there: f'{a=}'.rstrip(f'{a}') # or a bit better f'{a=}'.split('=')[0] # = exactly what I am proposing (Except the unneeded evaluation part) So if it is already ther

[Python-ideas] Re: re.match(pattern, string, require=True)

2023-10-22 Thread Eric V. Smith via Python-ideas
nt line. Eric _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-i

[Python-ideas] Re: Abstract dataclasses and dataclass fields

2023-12-22 Thread Eric V. Smith via Python-ideas
st is basically dead. And when you do post over there, please provide an example. It's not clear what would happen in the generated code if abstract=True. Eric _______ Python-ideas mailing list -- [email protected] To unsubscribe send an emai

Re: [Python-ideas] Syntactic sugar to declare partial functions

2018-08-14 Thread Chris Barker - NOAA Federal via Python-ideas
htening. -CHB _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Python docs: page: In what ways in None special

2018-08-15 Thread Chris Barker - NOAA Federal via Python-ideas
other — what’s special about is that it can’t be rebound. -CHB > > -- > Rhodri James *-* Kynesim Ltd _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Jump to function as an an alternative to call function

2018-08-17 Thread Chris Barker - NOAA Federal via Python-ideas
206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [email protected] _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker - NOAA Federal via Python-ideas
look at traitsui for ideas. http://docs.enthought.com/traitsui/ -CHB ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] A GUI for beginners and experts alike

2018-08-24 Thread Chris Barker - NOAA Federal via Python-ideas
t. So there should be s way to customize user interaction. Too bad all the cool kids are doing web dev these days — hard to get help with a desktop GUI project :-( > Pyjamas seems to be something like that: > > https://pypi.org/project/Pyjamas/ Or it was 6 years ago :-( -CHB _____

Re: [Python-ideas] support toml for pyproject support

2018-10-09 Thread Chris Barker - NOAA Federal via Python-ideas
ood choice! We’re have enough trouble with really slow adoption of the new ways of doing packaging, not even providing the tools seems to really defeat the purpose. -CHB ___ Python-ideas mailing list [email protected] https://mail.python.org/mail

Re: [Python-ideas] Revisiting Immutable Mappings

2018-10-11 Thread Chris Barker - NOAA Federal via Python-ideas
CHB ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Relative Imports

2018-11-13 Thread Chris Barker - NOAA Federal via Python-ideas
t; > from . import test_main > > to get the test/test_main module from the test/__init__ module. > > (Disclaimer: I have not actually run the above code to check that it > works, beyond testing that its not a SyntaxError.) > > What *precisely* is the problem you are tryi

Re: [Python-ideas] Suggested MapView object (Re: __len__() for map())

2018-12-11 Thread Chris Barker - NOAA Federal via Python-ideas
Chris Barker via Python-ideas >> wrote: >> [...] >> I'm still confused -- what's so wrong with: >> >> list(map(func, some_iterable)) >> >> if you need a sequence? > > You might need a sequence. Why do you think that has to be an *eager* > seq

Re: [Python-ideas] Suggested MapView object (Re: __len__() for map())

2018-12-12 Thread Chris Barker - NOAA Federal via Python-ideas
sure why one would do that, but it should be possible. - CHB _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add list.join() please

2019-01-29 Thread Chris Barker - NOAA Federal via Python-ideas
> Alex Shafer via Python-ideas wrote: >> 1) I'm in favor of adding a stringify method to all collections > > Are you volunteering to update all the collection > classes in the world written in Python? :-) To be fair, we could add an implementation to the sequence ABC, a

Re: [Python-ideas] Attribute-Getter Syntax Proposal

2019-03-08 Thread Chris Barker - NOAA Federal via Python-ideas
Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

[Python-ideas] Asyncio Future.set_result_threadsafe

2020-02-12 Thread Brian Allen Vanderburg II via Python-ideas
, a method like future.set_result_threadsafe, which would hide the details of the loop.call_soon/call_soon_threadsafe _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.pyth

[Python-ideas] Re: Exceptions as function calls to kill boilerplate

2020-10-13 Thread Brian Allen Vanderburg II via Python-ideas
eptionMaker("BadStuffErrror", details, plus, more_details) > > Implementation of 'ExceptionMaker' left to readers.  But it's possible > to write once. > > > > ___ > Python-ideas mailing list -- [email protected] > To

[Python-ideas] TextIOWrapper support for null-terminated lines

2020-10-24 Thread Brian Allen Vanderburg II via Python-ideas
nslated and manually scanning/splitting on null characters, though I'm sure there are better way to do this. Thanks, Brian Vanderburg II _______ Python-ideas mailing list -- [email protected] To unsubscribe send an email to python-ideas-le..

[Python-ideas] Conditional function/method/dict arguments assignments

2020-10-24 Thread Brian Allen Vanderburg II via Python-ideas
s not None:     data["count"] = count Could be written as data = {     "count" = count is not None ?? count, # set the "count" key in the dictionary conditionally, if count is not None, else don't set the key at all     "other_param" = ... ?? ...,     ... }

Re: [Python-ideas] High Precision datetime

2018-05-14 Thread Chris Barker - NOAA Federal via Python-ideas
oesn’t seem like a good idea to be handling months and femptoseconds with the same “encoding” -CHB _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] String and bytes bitwise operations

2018-05-18 Thread Chris Barker - NOAA Federal via Python-ideas
mber (and ascii) to represent the bytes, as it’s more human readable and consistent with other python types. > Maybe I'm completely misunderstanding your statement here. Again, it doesn’t much matter, until you get to deciding how to bitshift an entire bytes object. -CHB ____

Re: [Python-ideas] Add dict.append and dict.extend

2018-06-04 Thread Chris Barker - NOAA Federal via Python-ideas
ood solution. I know I spent years thinking “there should be an easy way to do this” before I found setdefault(). -CHB > > :-) > > [snip] > _______ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/list

Re: [Python-ideas] Making Path() a built in.

2018-06-05 Thread Chris Barker - NOAA Federal via Python-ideas
need it so often. > > I think Path fits the bill for being a built-in, I feel it's used more > often than any/all or zip, and maybe enumerate. > > Besides, it would help to make people use it, as I regularly meet dev > that keep import os.path because of habits, tutorials, boo

Re: [Python-ideas] Making Path() a built in.

2018-06-06 Thread Chris Barker - NOAA Federal via Python-ideas
s suggested in this thread) but that would bring up the startup costs problem. I wonder if a Path-lite with the core functionality, but less startup cost, would be useful here? -CHB _______ Python-ideas mailing list [email protected] https://mail

[Python-ideas] Python Decorator Improvement Idea

2018-06-15 Thread Brian Allen Vanderburg II via Python-ideas
y, as the runtime can pass relevant information such as the variables name This was just an idea I had that may have some use. Thanks, Brian Vanderburg II signature.asc Description: OpenPGP digital signature ___ Python-ideas mailing list Pytho

Re: [Python-ideas] Python Decorator Improvement Idea

2018-06-16 Thread Brian Allen Vanderburg II via Python-ideas
egistry["method"]         @fn         def method(self):             pass         # print None     # print Y     Y = fn(12) In this case it's not longer a decorator idea but more of an idea for a called function to be able to retrieve certain meta information about it's

Re: [Python-ideas] Fwd: Trigonometry in degrees

2018-06-23 Thread Chris Barker - NOAA Federal via Python-ideas
edge cases. So wrapping (or translating) an existing (well thought out) lib might be an easier way to go. -CHB _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] "Exposing" `__min__` and `__max__`

2018-06-27 Thread Chris Barker - NOAA Federal via Python-ideas
. -CHB ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Add a __cite__ method for scientific packages

2018-06-28 Thread Chris Barker - NOAA Federal via Python-ideas
___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

Re: [Python-ideas] Allow a group by operation for dict comprehension

2018-06-28 Thread Chris Barker - NOAA Federal via Python-ideas
sion that transforms the list first. That would get the keys right. Though still not call append for you. So maybe a solution is an accumulator special case of defaultdict — it uses a list be default and appends by default. Almost like counter... -CHB _______ Pyt

Re: [Python-ideas] Allow a group by operation for dict comprehension

2018-06-28 Thread Chris Barker - NOAA Federal via Python-ideas
l is. Which makes me think — a new classmethod on the builtin dict is a pretty heavy lift compared to a new type of dict in the collections module. -CHB _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-

Re: [Python-ideas] Where should grouping() live (was: grouping / dict of lists)

2018-07-06 Thread Chris Barker - NOAA Federal via Python-ideas
ilt a histogram for continuous data as well. Though that might be a bit klunky. But if someone thinks that’s a good idea, a PR for an example would be accepted: https://github.com/PythonCHB/grouper -CHB -- Steve ___ Python-ideas mailing list Python-

Re: [Python-ideas] if we were to ever shorten `A if A else B` (was: PEP 505: None-aware operators)

2018-07-21 Thread Chris Barker - NOAA Federal via Python-ideas
__ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ ___________ Python-ideas mailing list Python-ideas@pyth

Re: [Python-ideas] Multi-core reference count garbage collection

2018-07-21 Thread Chris Barker - NOAA Federal via Python-ideas
de, and run a garbage collector once in a while instead. After all, cPython’s (mostly) deterministic garbage collection is not guaranteed by the language standard. -CHB ___________ Python-ideas mailing list [email protected] https://mail.python.org/mailma

Re: [Python-ideas] Performance improvements via static typing

2018-07-21 Thread Chris Barker - NOAA Federal via Python-ideas
in the end. Sure, type hints could be used as a bare trigger for certain > optimistic optimisations, but then, it's cheap enough to always apply these > optimisations regardless, via a C type check. > > Stefan > > __

Re: [Python-ideas] Revisiting str.rreplace()

2018-07-21 Thread Chris Barker - NOAA Federal via Python-ideas
t; something which could much more easily be done by adding an rreplace > function - which is the real point of the comment. > Paul > _______ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/

Re: [Python-ideas] Python docs page: In what ways is None special

2018-07-23 Thread Chris Barker - NOAA Federal via Python-ideas
lp the authors of suck a package(s), but if the bulk of users didn’t need them, then no point in adding them to the language. -CHB _______ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of

Re: [Python-ideas] Python docs page: In what ways is None special

2018-07-23 Thread Chris Barker - NOAA Federal via Python-ideas
; --- This is also a convention — and primarily applies to mutable defaults, which you hardly ever want to assign directly. So a good example of None being used as a sentinel, but nog really anything special about None. -CHB > / ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/

<    12   13   14   15   16   17