The Image call has proved to be remarkably popular, but its signature is a bit awkward.
- The most common usage I've seen from looking at many notebooks is to call it with a filename, but that's the third positional argument, forcing the vast majority of usage to be done with
Image(filename=...), instead of simply Image(...).
- The data argument accepts raw data, a url or a filename, but the signature only mentions urls and data.
I think we should change the signature and dosctring to take simply a url/filename as the first argument, which could be called pathspec or location. For backwards compatibility we can continue accepting the keywords filename and url, but both aren't necessary.
The much less common usage of calling it with raw data can be relegated to be called with data = ..., though it's worth considering for backwards compatibility auto-detection of raw data if the argument is say longer than 10kbytes or so.
The
Imagecall has proved to be remarkably popular, but its signature is a bit awkward.Image(filename=...), instead of simplyImage(...).I think we should change the signature and dosctring to take simply a url/filename as the first argument, which could be called
pathspecorlocation. For backwards compatibility we can continue accepting the keywordsfilenameandurl, but both aren't necessary.The much less common usage of calling it with raw data can be relegated to be called with
data = ..., though it's worth considering for backwards compatibility auto-detection of raw data if the argument is say longer than 10kbytes or so.