-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
things we should maybe export in 0.2 #4531
Comments
I like the idea of Perhaps a slightly less cute version would be: var_name = "BAZ"
with_env({"FOO"=>"BAR", var_name=>"QUX"}) do
# FOO and BAR temporarily changed in environment
end That way, you can still have variables containing both keys and values without having to resort to metaprogramming. EDIT: Too much python in my blood, |
It's also unclear to me whether you really ever need to use this for more than a single environment variable at a time, in which case the current |
-1 to exporting |
I kind of like the keyword args for |
I like it too. The only downside is that it doesn't allow the key to be an expression, so there would need to be another version of the function that allows you to have that as well. |
This reminds me of the desire for a dictsplat function that came up on the
|
Oh yeah. This plus |
I'm ok with adding warn_once to warn via a keyword argument. |
I would also like to export the BLAS and LAPACK module names, so that the routines within them are easier to get to. |
I'm ok with that too. 2 dots ( |
There are a few useful things that we should probably polish up the interfaces of, document, and export as part of 0.2.
source_path
is one (#4530), but there are some others, includingwith_env
,warn_once
, and maybetty_rows
andtty_cols
. There are probable others. Forwith_env
I was considering using the keyword varargs facility to make the interface something like this:but thought that might be a bit too cute. I was considering rolling
warn_once
intowarn
via aonce
keyword that defaultsfalse
.The text was updated successfully, but these errors were encountered: