[Python-ideas] Re: Moving PEP 584 forward (dict + and += operators)

2019-12-02 Thread Ryan
With regard to | vs +, I honestly think the former would be *easier* for beginners than the latter, because: - Having a behavior that is unrelated to other uses of + would arguably be harder to learn, or at least easier to misunderstand when you first see it. - In the CS class world, many students

[Python-ideas] Re: addition of "nameof" operator

2020-01-21 Thread Ryan
I believe Python 3.8's '=' f-string specifier ( https://docs.python.org/3/whatsnew/3.8.html#f-strings-support-for-self-documenting-expressions-and-debugging) combined with __name__ does what you'd want: return f'{self.__class__.__name__}({self.name=}, {self.age=})' Outside of the __name__ dance,

[Python-ideas] Re: None should raise a new exception, NoneError

2020-03-02 Thread Ryan
This feels a lot like a really verbose way of having nulls-safe operators. On Mon, Mar 2, 2020, 10:40 AM Soni L. wrote: > All operations on None should raise a NoneError, which should be a > TypeError for backwards compatibility. > > try: >x = a[b][c][d][e][f] + g.foo(h) > except NoneError:

[Python-ideas] Reminder about intent of messages (Was: Syntactic sugar to declare partial functions)

2018-08-12 Thread Ryan Gonzalez
; >> > >> > Rude? Who would it be rude to if we had chosen "anonfunc" instead of >> > "lambda"? >> >> No, but it's no less jargonny. >> >> > Very few of us are computer scientists by profession. That's not even &

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Ryan Gonzalez
re right. The worst reaction > you are likely to get is an eye roll. > > / Kankyo (aka Anders) > ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: ht

Re: [Python-ideas] Deprecation utilities for the warnings module

2018-09-13 Thread Ryan Gonzalez
s.openstack.org/debtcollector/latest/reference/index.html > Certain aspects of my implementation are inspired by it. > > Please let me know what you think about the idea in general > and implementation in particular. If that's something the community > is interested in, I'

Re: [Python-ideas] Retire or reword the "Beautiful is better than ugly" Zen clause

2018-09-13 Thread Ryan Birmingham
. Forgetting for a moment the charged context of the conversation itself, does anyone have any opinions on how this would come to be? Thank you for reading and hopefully listening, -Ryan Birmingham On Thu, 13 Sep 2018 at 23:03, Terry Reedy wrote: > On 9/13/2018 7:34 PM, Tim Peters wrote: &g

Re: [Python-ideas] "slur" vs "insult"?

2018-09-21 Thread Ryan Gonzalez
hodri James *-* Kynesim Ltd > > > ___ > > > Python-ideas mailing list > > > [email protected] > > > https://mail.python.org/mailman/listinfo/python-ideas > > > Code of Conduct: http://python.org/psf/codeo

Re: [Python-ideas] JS’ governance model is worth inspecting

2018-09-21 Thread Ryan Gonzalez
on the details, this is just the summary off the top of my > head. > > — > I’m not saying this should be Python’s governance model, just to keep JS’ > in mind. > > > ___ > Python-ideas mailing list > [email protected]

Re: [Python-ideas] AMEND PEP-8 TO DISCOURAGE ALL CAPS

2019-01-04 Thread Ryan Gonzalez
seems like ALL_CAPS kind of came from macros being using for constants in C and persisted. -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/ On Fri, Jan 4, 2019, 1:02 PM Abe Dillon I keep coming back to this great video <http

Re: [Python-ideas] What factors led Guido to quit?

2019-02-03 Thread Ryan Gonzalez
ity service award for his many contributions. -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/ On Sun, Feb 3, 2019, 11:33 AM James Lu wrote: > Are you a moderator or committed? > > I disagree with you. This, like the communica

Re: [Python-ideas] A proper way to bring real interfaces to Python

2019-05-04 Thread Ryan Gonzalez
Worth maybe noting that this could play interestingly with PEP 484? -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/ On May 4, 2019, 8:24 PM -0500, Serge Matveenko , wrote: > Hi, all! > > I believe, almost everybody is fa

[Python-ideas] Re: Assign-in-place operator

2019-06-05 Thread Ryan Gonzalez
like that slice assignment makes much more sense. -- Ryan https://refi64.com/ On Jun 5, 2019, 2:56 AM -0500, Yanghao Hua , wrote: > On Tue, Jun 4, 2019 at 12:47 PM Jeroen Demeyer wrote: > > > > I'd like to get rid of all the signal and HDL stuff (whatever that > > means)

[Python-ideas] Re: Canceling thread in python

2019-06-19 Thread Ryan Gonzalez
IME in many of these cases you're better off using asyncio instead. -- Ryan https://refi64.com/ On Jun 20, 2019, 12:14 AM -0500, Matúš Valo , wrote: > Hi All, > > Currently it is not possible to "kill" thread which is blocked. The rationale > for this is handlin

[Python-ideas] Re: Namespace context managers

2019-07-28 Thread Ryan Gonzalez
I feel like this could have some interesting side uses (typing on mobile so ignore the crappy indentation): with Namespace('a'): x = 1 y = 2 print(a.__dict__) # we now have a dict The GN build system flat-out has no dictionary / mapping type in favor of scopes like this. On Sun, Jul 28, 2019,

[Python-ideas] Re: Entrypoint function for modules (AKA if __name__ == '__main__' ) with built-in argument parsing

2019-07-30 Thread Ryan Gonzalez
I think you might find plac[1] and fire[2] rather interesting. I do feel an explicit __run__ would go against the spirit of "explicit is better than implicit" a bit... [1] https://micheles.github.io/plac/ [2] https://github.com/google/python-fire On Tue, Jul 30, 2019, 8:03 PM wrote: > Maybe th

[Python-ideas] Exceptions with Message Templates

2019-08-08 Thread Ryan Fox
Exception definitions in Python are not great. There are two main ways they're used in the code that I've read: 1) By far the most common: >>> class MyException(Exception): ... pass >>> raise MyException(f'Bad thing happened during {action} in {context}') 2) Much rarer: >>> class MyExceptio

[Python-ideas] Re: Exceptions with Message Templates

2019-08-08 Thread Ryan Fox
n't be up > for adding a new built-in exception as you're asking every book on Python > to be rewritten to cover this which is no small thing. > > On Thu, Aug 8, 2019 at 8:56 AM Ryan Fox wrote: > >> Exception definitions in Python are not great. There are two

[Python-ideas] Re: Exceptions with Message Templates

2019-08-08 Thread Ryan Fox
d to continue this discussion. On Thu, Aug 8, 2019 at 4:12 PM Andrew Barnert wrote: > On Aug 8, 2019, at 08:52, Ryan Fox wrote: > > > > >>> class MyException(Exception): > > ... def __init__(self, action, context): > > ... super().__init__(f&#x

[Python-ideas] Re: Exceptions with Message Templates

2019-08-09 Thread Ryan Fox
t; >> >> >> On Thu, Aug 8, 2019 at 5:24 PM Sebastian Kreft wrote: >> >>> >>> >>> On Thu, Aug 8, 2019 at 7:09 PM Andrew Barnert via Python-ideas < >>> [email protected]> wrote: >>> >>>> On Aug 8, 2019, at

[Python-ideas] Re: Simple feature for argparse.py

2019-10-09 Thread Ryan Gonzalez
I believe you want Python 3.7's parse_intermixed_args: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_intermixed_args A quick test seems to work: import argparse p = argparse.ArgumentParser() p.add_argument('files', nargs='*') p.add_argument('-f', '--force', actio

Re: [Python-ideas] Extending expressions using ellipsis

2016-08-31 Thread Ryan Gonzalez
p my code read better without changing any semantics. >> >> Feedback is welcome! >> >> Shane >> ___ >> Python-ideas mailing list >> [email protected] >> https://mail.python.org/mailman/listinfo/python-ideas >

Re: [Python-ideas] Extending expressions using ellipsis

2016-09-01 Thread Ryan Hiebert
> On Sep 1, 2016, at 1:40 AM, Greg Ewing wrote: > > Guido van Rossum wrote: >> Would this be enforced in the grammar or by the lexer? Since you say >> you expect the indentation to be enforced, that suggests it would be >> done by the grammar, > > I think it could be done by having the lexer en

Re: [Python-ideas] Typecheckers: there can be only one

2016-09-07 Thread Ryan Gonzalez
> Hugh Fisher > ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ -- Ryan [ERROR]: Your autotools build scrip

Re: [Python-ideas] Null coalescing operator

2016-09-10 Thread Ryan Gonzalez
https://github.com/kirbyfan64/_frozensafemockobjectimplementation In all seriousness, though, I really feel like that would be the ultimate bug magnet, since it'd be easy to forget to un-wrap the object afterwards. -- Ryan [ERROR]: Your autotools build scripts are 200 lines longer than

Re: [Python-ideas] Overloading operators for testing

2016-09-17 Thread Ryan Gonzalez
FYI, pytest already does this: http://doc.pytest.org/en/latest/ -- Ryan [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something’s wrong. http://kirbyfan64.github.io/ On Sep 17, 2016 7:55 PM, "Arek Bulski" wrote: > I am using declarative testing a lo

Re: [Python-ideas] from __pip__ import

2016-09-19 Thread Ryan Gonzalez
ecent call last): ... MissingPackageError: This script requires package(s) which are not installed: mypackage>=1.0, other_package That way, you don't get the weird import errors, but you don't have to worry about all the subtleties of automatic downloading. -- Ryan [ERROR]: Your autotools build scripts ar

Re: [Python-ideas] Make partial a built-in

2016-09-20 Thread Ryan Gonzalez
; > > > > -- > --Guido van Rossum (python.org/~guido) > > ___ > 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] PEP8 dictionary indenting addition

2016-10-11 Thread Ryan Gonzalez
'll have forgotten that I need to start the line with a space :) Until you end up with like 20 merge conflicts because some editors strip trailing whitespace... > > Best, > Erik > ___ > Python-ideas mailing list > Python-ideas@p

Re: [Python-ideas] Add a method to get the subset of a dictionnary.

2016-10-12 Thread Ryan Gonzalez
That discussion seemed to mostly just conclude that dicts shouldn't have all set operations, and then it kind of just dropped off. No one really argued the subset part. -- Ryan [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something’s wrong. http://kirby

Re: [Python-ideas] Proposal for default character representation

2016-10-12 Thread Ryan Gonzalez
gt; ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ -- Ryan (ライアン) [ERROR]: Your autotools build scripts are 200 lines longer

Re: [Python-ideas] Proposal for default character representation

2016-10-12 Thread Ryan Gonzalez
ilman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ -- Ryan (ライアン) [ERROR]: Your autotools build scripts are 200 lines longer than your program. Something’s wrong. http://kirbyfan64.github.io/ ___ Python-ideas mailing li

[Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-21 Thread Ryan Birmingham
if it has come up before, and if there are any compatibility issues that I'm not seeing here. Thank you, -Ryan Birmingham ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code o

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-21 Thread Ryan Birmingham
I was thinking of using them only as possibly quotes characters, as students and beginners seem to have difficulties due to this quote-mismatch error. That OSX has smart quotes enabled by default makes this a worthwhile consideration, in my opinion. -Ryan Birmingham On 22 October 2016 at 01:34

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-21 Thread Ryan Birmingham
typographical characters. -Ryan Birmingham On 22 October 2016 at 02:35, Steven D'Aprano wrote: > On Sat, Oct 22, 2016 at 01:17:58AM -0400, Ryan Birmingham wrote: > > Hello everyone, > > > > I want to start small and ask about smart/curly quote marks (” vs "). > >

Re: [Python-ideas] Smart/Curly Quote Marks and cPython

2016-10-22 Thread Ryan Birmingham
Per the comments in this thread, I believe that a better error message for this case would be a reasonable way to fix the use case around this issue. It can be difficult to notice that your quotes are curved if you don't know that's what you're looking for. -Ryan Birmingham On 22

Re: [Python-ideas] More user-friendly version for string.translate()

2016-10-24 Thread Ryan Birmingham
I also believe that using a text file would not be the best solution; using a dictionary, other data structure, or anonomyous function would make more sense than having a specially formatted file. On Oct 24, 2016 13:45, "Chris Barker" wrote: > my thought on this: > > If you need translate() you

[Python-ideas] Showing qualified names when a function call fails

2016-10-24 Thread Ryan Gonzalez
call last): File "", line 1, in File "", line 2, in __init__ AssertionError to: Traceback (most recent call last): File "", line 1, in File "", line 2, in MyClass.__init__ AssertionError which could make it easier to find where exactly an error or

Re: [Python-ideas] Showing qualified names when a function call fails

2016-10-25 Thread Ryan Gonzalez
So, based on everyone's feedback, I just created this: http://bugs.python.org/issue28536 On Mon, Oct 24, 2016 at 5:07 PM, Ryan Gonzalez wrote: > I personally find it kind of annoying when you have code like this: > > > x = A(1, B(2, 3)) > > > and Python'

Re: [Python-ideas] Showing qualified names when a function call fails

2016-10-25 Thread Ryan Gonzalez
Also, as an extension of this idea, would it be possible to improve errors like this: class X: pass X() # object() takes no parameters to show the actual type instead of just 'object'? On Tue, Oct 25, 2016 at 4:48 PM, Ryan Gonzalez wrote: > So, based on everyone's feedba

Re: [Python-ideas] Showing qualified names when a function call fails

2016-10-25 Thread Ryan Gonzalez
Yeah, I just checked the source and tried changing it. Seems to work well. On Tue, Oct 25, 2016 at 8:11 PM, Steven D'Aprano wrote: > On Tue, Oct 25, 2016 at 04:55:21PM -0500, Ryan Gonzalez wrote: > > Also, as an extension of this idea, would it be possible to improve > err

Re: [Python-ideas] SI scale factors alone, without units or dimensional analysis

2016-10-28 Thread Ryan Birmingham
I'd certainly be interested in hearing about how this has worked with C++, but this would certainly make scientific code less easy to misuse due to unclear units. -Ryan Birmingham On 28 October 2016 at 16:45, Sven R. Kunze wrote: > On 28.10.2016 22:06, MRAB wrote: > >> On

Re: [Python-ideas] PEP 531: Existence checking operators

2016-10-29 Thread Ryan Birmingham
I certainly like the concept, but I worry that use of __exists__() could generalize it a bit beyond what you're intending in practice. It seems like this should only check if an object exists, and that adding the magic method would only lead to confusion. -Ryan Birmingham On 28 October 20

Re: [Python-ideas] PEP 531: Existence checking operators

2016-10-29 Thread Ryan Gonzalez
object idiom could be rewritten as:: > > class Maybe: > SENTINEL = object() > def __init__(self, value): > self._result = (value,) is value is not self.SENTINEL else () > def __exists__(self): > return self._result

Re: [Python-ideas] Method signature syntactic sugar (especially for dunder methods)

2016-11-08 Thread Ryan Birmingham
o teach, as opposed to changing them. -Ryan Birmingham On 7 November 2016 at 23:49, Stephen J. Turnbull < [email protected]> wrote: > Nathan Dunn writes: > > > > * the mapping protocol covers more than just __getitem__ > > > > __setitem__(self, key

Re: [Python-ideas] PEP 532: A circuit breaking operator and protocol

2016-11-14 Thread Ryan Fox
f) else obj.field.of.interest obj.get('field', {}).get('of', {}).get('interest') (The first example shows how it would be handled with the PEP in its current state.) Maybe these are too far out of scope, I'm not sure. They feel very similar to me though.

Re: [Python-ideas] PEP 532: A circuit breaking operator and protocol

2016-11-14 Thread Ryan Fox
> > No, the conditional branching would be based on exists.__bool__ (or, > in the current working draft, is_not_none.__bool__), and that would be > "0 is not None", which would be True and hence short-circuit. > > > `__then__` is responsible for *unwrapping* the original value from the > circuit b

Re: [Python-ideas] Technical possibilities for a syntax [was: Reverse assignment operators ...]

2016-11-16 Thread Ryan Gonzalez
then thought, oh that would > be too pedantic. > You say you have no time and write a whole page about it, > so don't blame me that I take too much time from you. > > Mikhail > ___ > Python-ideas mailing list > [email protected] > htt

Re: [Python-ideas] incremental hashing in __hash__

2016-12-27 Thread Ryan Gonzalez
esult # repeat return hasher.hash [1]: https://hg.python.org/cpython/file/dcced3bd22fe/Objects/tupleobject.c#l331 [2]: https://bitbucket.org/pypy/pypy/src/d8febc18447e1f785a384d52413a345d7b3db423/rpython/rlib/objectmodel.py#objectmodel.py-562 -- Ryan (ライアン) Yoko Shimomura > ryo (supercel

Re: [Python-ideas] Python Reviewed

2017-01-10 Thread Ryan Gonzalez
thon is the way it is because that's the way it is, and we like it that way. ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/ -- Ryan (ライアン) Yoko Shimomura > ry

Re: [Python-ideas] How to respond to trolling

2017-01-10 Thread Ryan Birmingham
I think that replying with an almost canned response, like the one Ned proposed ("unless you are seriously proposing a change to the language, this is not the right list."), would help discourage other list members from responding where responses aren't necessary. -Ryan Birmingham

Re: [Python-ideas] pathlib suggestions

2017-01-24 Thread Ryan Gonzalez
As another suggestion, I'd love an rmtree method analogous to shutil.rmtree. And maybe also a remove method, that basically does: if path.is_dir(): path.rmtree() else: path.unlink() \-- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiro

Re: [Python-ideas] Is it Python 3 yet?

2017-01-26 Thread Ryan Birmingham
hen move to 2.7 being substantially smaller, then eventually to dropping 2.7. -Ryan Birmingham On 26 January 2017 at 11:11, Victor Stinner wrote: > Hi, > > The download button of https://www.python.org/ currently gives the > choice between Python 2.7 and 3.6. I read more and more ar

Re: [Python-ideas] A decorator to call super()

2017-01-31 Thread Ryan Gonzalez
https://github.com/kirbyfan64/mirasu \-- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else <http://refi64.com/> ___ Python-ideas mailing list [email protected] https://mail.python.or

[Python-ideas] List indexing multiple elements

2017-02-20 Thread Ryan Gonzalez
rt is solely so that slices would be allowed in the syntax, but if you guys don't like the idea, the second part still stands. Thoughts? *ducks from flying tomatoes* -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone

Re: [Python-ideas] List indexing multiple elements

2017-02-20 Thread Ryan Birmingham
So, to make sure I have this right: your proposal says array should be indexable by a list of indexes as they're currently done, in a tuple, right? Would this also mean that something like (1:4, 8:10, 13) should be an acceptable constructor for a tuple? -Ryan Birmingham On 20 February 2017

Re: [Python-ideas] suggestion about the sort() function of the list instance

2017-02-26 Thread Ryan Birmingham
It sorts the list in place. Can you use sorted(item_list)? -Ryan Birmingham On 26 February 2017 at 22:07, qhlonline wrote: > Hi, all > I have a suggestion that, the sort() member method of the list > instance, should return the 'self' as the result of list.sort() call.

Re: [Python-ideas] unify usage of mutable and immutable objects

2017-02-28 Thread Ryan Birmingham
I'm sorry for the confusion, but what is frozen_tree_set() here, and what is ipop? frozensets don't have pop or 'ipop', so my apologies that I'm a bit lost here. -Ryan Birmingham On 28 February 2017 at 08:59, 语言破碎处 wrote: > > Hi! > I write a '<&#

Re: [Python-ideas] add variable "__this_func__" inside all functions' locals

2017-02-28 Thread Ryan Hiebert
> On Feb 28, 2017, at 8:14 PM, 语言破碎处 wrote: > > We need not care other functions, just the "current" one. > Other functions are definitely out of our control. > My last example distinguish 3 cases: > self.f()# object/overloaded version > __class__.f(self) # decorated ve

Re: [Python-ideas] add __contains__ into the "type" object

2017-03-02 Thread Ryan Hiebert
By itself, I don't see using the ``in`` syntax to check for ``instanceof`` as a big benefit, given the overhead of learning that new concept. However, given in the light of a bigger concept, I think it may make more sense. If we accept that it may be desirable to work with types as set-like obje

Re: [Python-ideas] Smoothing transition: 'unicode' and 'basestring' as aliases for 'str'?

2017-03-03 Thread Ryan Birmingham
o I understand where a desire like this would come from. Would more specific and succinct documentation on this change alone help? -Ryan Birmingham On 3 March 2017 at 06:44, Thomas Güttler wrote: > I found this in an old post: > > > Maybe too late now but there should have been 'unicode&#

Re: [Python-ideas] Wrapper for ctypes

2017-03-07 Thread Ryan Gonzalez
Ever looked up cffi? You won't be disappointed. -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On Mar 7, 2017 3:43 AM, "George Fischhof" wrote: > Hi Guys, > > right now I had to call functions fr

[Python-ideas] Adding an 'errors' argument to print

2017-03-24 Thread Ryan Gonzalez
gument to print? That way, I could've just done: print(mystring, errors='replace') without having to worry about it crashing. -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com __

Re: [Python-ideas] Adding an 'errors' argument to print

2017-03-26 Thread Ryan Gonzalez
FWIW, using the ascii function does have the problem that Unicose characters will be escaped, even if the terminal could have handled them perfectly fine. -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On Mar 26, 2017 9:

Re: [Python-ideas] IDEA

2017-03-26 Thread Ryan Gonzalez
kage. >(PS. i would love to develop a new IDE of my own even if that is > besides GSoc ) > > ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/co

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-03-29 Thread Ryan Gonzalez
I feel like that borders on a bit too wordy... Personally, I'd like to see something like Felix's regular definitions: http://felix-lang.org/share/src/web/tut/regexp_01.fdoc#Regular_definitions._h -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >&

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Ryan Gonzalez
Have you tried PyParsing and/or Grako? They're some of my favorites (well, I like PLY too, but I'm thinking you wouldn't like it too much). -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On Apr 3, 2017 3:2

Re: [Python-ideas] "import me" to display some summary of the current python installation

2017-04-11 Thread Ryan Gonzalez
...except it would break everybody who has a module named `me` (which admittedly isn't too common...). Something like `import this.what` or something like that would be cool, though. -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http

Re: [Python-ideas] Augmented assignment syntax for objects.

2017-04-25 Thread Ryan Gonzalez
y much any other variable name, yet there's no other real use case outside of methods. -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On Apr 24, 2017 8:08 PM, "Erik" wrote: > Hi. I suspect that this may h

Re: [Python-ideas] Augmented assignment syntax for objects.

2017-04-27 Thread Ryan Gonzalez
letting > people eliminate a lot of the boilerplate currently involved in > writing classes that produce nice and easy to use instances. > > Cheers, > Nick. > > -- > Nick Coghlan | [email protected] | Brisbane, Australia > _____

Re: [Python-ideas] Tighten up the formal grammar and parsing a bit?

2017-05-15 Thread Ryan Gonzalez
I guess maybe if you overload the operators to return broken objects, maybe then they would be different? -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On May 15, 2017 9:50 AM, "Serhiy Storchaka" wrote: >

Re: [Python-ideas] dict(default=int)

2017-05-29 Thread Ryan Gonzalez
Sometimes I feel that it would be neat of dict constructors (like proposed previously in the thread) could also be chained, e.g.: dict.ordered.default(int)(a=1, b=2) -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On May 2

Re: [Python-ideas] π = math.pi

2017-06-01 Thread Ryan Gonzalez
nts do NOT have halfwidth support. Is this correct? -- Ryan (ライアン) Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else http://refi64.com On Jun 1, 2017 2:27 PM, "Masayuki YAMAMOTO" wrote: Hi Stephan, Nevertheless, I would like to point out that the

[Python-ideas] Adding "View Python 3 Documentation" to all Python 2 documentation URLs

2017-09-06 Thread Ryan Gonzalez
/tutorials/2.3/ (I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.) -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else h

Re: [Python-ideas] PEP 563: Postponed Evaluation of Annotations, first draft

2017-09-11 Thread Ryan Gonzalez
return result > > This is brittle and doesn't even cover slots. Requiring the use of > module-level names simplifies runtime evaluation and provides the > "one obvious way" to read annotations. It's the equivalent of absolute > imports. > > > Ackn

Re: [Python-ideas] A proliferation of (un-)Pythonically programmatic pragmas

2017-11-13 Thread Ryan Gonzalez
ter way? > > Cheers, > -Barry > > ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ -- Ryan (ライアン) Yoko Sh

Re: [Python-ideas] New PEP proposal -- Pathlib Module Should Contain All File Operations

2018-03-18 Thread Ryan Gonzalez
o/python-ideas >> Code of Conduct: http://python.org/psf/codeofconduct/ >> >> > > ___ > Python-ideas mailing list > [email protected] > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http:/

Re: [Python-ideas] Dart like multi line strings identation

2018-03-31 Thread Ryan Gonzalez
too complicated though, I can't estimated or understand this... thx for reading, Marius ___ 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 "local" pseudo-function

2018-04-28 Thread Ryan Gonzalez
t. In other words, this would be illegal: local(a=1) and you would have to do this: local(a=1, a) Now if the user mixes up = and ==, it'd be a "compile-time error". -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/

Re: [Python-ideas] A "local" pseudo-function

2018-04-28 Thread Ryan Gonzalez
I'm pretty sure the debate about braces defining scope in Python has long-since ended... -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else https://refi64.com/ On April 28, 2018 9:37:57 PM Ken Hilton wrote: > local { m = re.matc

Re: [Python-ideas] A comprehension scope issue in PEP 572

2018-05-06 Thread Ryan Gonzalez
nsequences of what I explicitly asked for". [1] https://www.python.org/dev/peps/pep-0572/ ___ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduc

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-10 Thread Ryan Gonzalez
. >> >> How much support was there for ":="? Are you serious about bringing >> back Pascal and Algol from their comfortable resting places? >> > ___ > Python-ideas mailing list > [email protected] > ht

Re: [Python-ideas] Inline assignments using "given" clauses

2018-05-11 Thread Ryan Gonzalez
On May 11, 2018 1:45:27 PM Tim Peters wrote: [Brendan Barnwell] . . . and it's true the latter is a bit more verbose in that case for little extra benefit. But when the locally-defined value is used within a more complicated expression (like the quadratic formula example), I think readabilit

Re: [Python-ideas] Trigonometry in degrees

2018-06-07 Thread Ryan Gonzalez
You could always do e.g. math.sin(math.degress(radians)) and so forth... On June 7, 2018 3:07:21 PM Robert Vanden Eynde wrote: I suggest adding degrees version of the trigonometric functions in the math module. - Useful in Teaching and replacing calculators by python, importing something

Re: [Python-ideas] Operator for inserting an element into a list

2018-06-12 Thread Ryan Gonzalez
^ is also used in regexes for matching the *beginning* of a string... Realistically, I don't think this proposal would be added, but if it were, ^ would be a horrible choice. That being said, I do understand the feeling of half your code being calls to .append or .extend. You could always do:

Re: [Python-ideas] Should nested classes in an Enum be Enum members?

2018-06-27 Thread Ryan Gonzalez
I *think* he's referring to something like this: class A(enum.Enum): class Inner(NamedTuple): ... isinstance(A.Inner(), A()) # True I *think* that's it. On June 27, 2018 2:26:23 PM Ethan Furman wrote: On 06/27/2018 12:04 PM, Elazar wrote: > בתאריך יום ד׳, 27 ביוני 2018, 11:59,

Re: [Python-ideas] Including the unparse module in the standard library

2018-07-12 Thread Ryan Gonzalez
If you want to get source code from an AST, you'd probably be better off with a more fully-featured library like Astor: https://github.com/berkerpeksag/astor On July 12, 2018 1:21:23 PM Andre Roberge wrote: In the cPython repository, there is an unparse module in the Tools section. https://