You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As brought up in #1993, the single underscore is a frequent idiom in python and would shadow the subtraction operator.
I propose that leading (and trailing?) hyphens be mangled like other characters, and only inner hyphens be mangled to underscores.
This means that e.g. --init-- is no longer the same thing as __init__, but using hyphens for dunders (and for private names) was nominally against Hy's style guide anyway.
This also means that (import [module [*]]) can pick up on symbols like - or -> without having to use __all__, since they no longer have leading underscores.
The text was updated successfully, but these errors were encountered:
As brought up in #1993, the single underscore is a frequent idiom in python and would shadow the subtraction operator.
I propose that leading (and trailing?) hyphens be mangled like other characters, and only inner hyphens be mangled to underscores.
This means that e.g.
--init--
is no longer the same thing as__init__
, but using hyphens for dunders (and for private names) was nominally against Hy's style guide anyway.This also means that
(import [module [*]])
can pick up on symbols like-
or->
without having to use__all__
, since they no longer have leading underscores.The text was updated successfully, but these errors were encountered: