-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alternative names for single-letter constructors #29
Comments
For m, I can imagine just overriding however, this doesn't work for v, s, and b, because a single-element *args would be ambiguous, so that's not a generalizable idea... |
I see your point but also value the shortnames for their conciseness.
Make a file with your own aliases and import from that file instead of directly from pyrsistent. If you do come up with a good set of aliases I'm willing to include them. I don't have any of the top of my head but will think a bit about it. |
No really good ideas for this one as of yet. If you like living on the edge you may want to check out a hack I did a couple of days ago. :-) |
I also find one-letter names a bit weird (un-Pythonic). I'm not sure when |
|
wow, pyrthon is scary :) you could make registration a bit nicer by using a source-file coding declaration, e.g. |
Thanks, will look into the |
Using it this way would definitely be a hack, since the mechanism is meant to be used for specifying the encoding of the source text (e.g. utf-8 vs ascii or whatever), but may be nice compared to having to register the modules externally. Anyway I don't think I'd inflict either of these solutions on my production codebase, just a thought :) |
Rust uses |
oh, by the way, about that coding thing, I found an old repo where I experimented with it: https://github.com/radix/python-parsing-shenanigans |
+1. I don't find the necessity to have single-letter names. |
I will close this issue. I think there are a bunch of projects relying on the single letter initializers, they are not going away because it would break backward compatibility badly. |
The single-letter constructors can be pretty annoying
It'd be nice if we had alternative, longer names for
v
,s
,m
, andb
.The text was updated successfully, but these errors were encountered: