Comments (2)
This is because the save(path)
method is "curried," i.e. it returns a function that accepts an object as input and calls save(path, object)
. What you see printed in the REPL is due to how Julia names anonymous functions (see the second paragraph of the relevant manual section). That is to say, what you're observing is expected behavior, though it is apparently not actually documented anywhere except in a comment near the line in the code you linked that save
behaves this way.
(I'll note as an aside that I'm personally of the opinion that packages shouldn't provide curried methods and it should be up to the user to obtain whatever unclear syntax they want via macros from separate packages. This is admittedly a rather spicy take that I'm sure almost no one agrees with, but it would at least improve the situation you're observing.)
Removing the aforementioned curried method would be a breaking change, so one possible solution here would be to improve the docstring for save
by including something along the lines of
"""
save(file; kwargs...) -> Function
Return an anonymous function that accepts a single argument `x` as
input and returns `save(file, x; kwargs...)`. Note that `x` should
be savable in the given file type; consult the relevant package
documentation for more information.
"""
from fileio.jl.
Actually, there is an existing issue #324 which discusses this case and removing the curried method was already proposed in that thread.
from fileio.jl.
Related Issues (20)
- Update / replace Libz registration for .gz files HOT 3
- The 1.6 update seems to have broken load from URLs for CSVFiles
- Saving output to txt/CSV file? HOT 1
- Proposal: FileIO.save keyword argument syntax (FileIO.kwsave ?) HOT 3
- FIle collision on case sensitive file systems after recent release.
- House AVSfldIO.jl under JulioIO ? HOT 9
- FileIO is not threadsafe HOT 4
- Error in magic function detect_rdata HOT 4
- There was an error in magic function detect_rdata_single HOT 5
- No applicable_loaders found for UNKNOWN HOT 3
- RData can't load .rda files with [email protected] but can with [email protected] HOT 2
- Confusing error when saving the wrong thing
- AstroIO required when it shouldn't be HOT 5
- Too many open files HOT 4
- FileIO not loading / requiring dependency AVSfldIO properly HOT 2
- @maybe macro
- registering zarr files HOT 1
- register Matlab's .mat HOT 1
- Incorrectly export GIF image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fileio.jl.