Это зависит от машины, я прав?
>>> z = zipfile.ZipFile('test.zip')
>>> z.extractall()
>>> os.listdir(os.getcwd())
package main
import (
"fmt";
"io";
"bytes"
)
func New() io.ReadWriter {
return bytes.NewBufferString("a_string")
}
func Read(r io.Reader) {
buf := make([]byte, 1)
r.Read(buf)
fmt.Printf("Read '%s'\n", buf)
}
func Write(w io.Writer) {
w.Write([]byte("X"))
fmt.Printf("Written 'X'\n")
}
func ReadMany(list []io.Reader) {
for _, r := range(list) {
Read(r)
}
}
func WriteMany(list []io.Writer) {
for _, w := range(list) {
Write(w)
}
}
func main() {
base := New()
list := make([]io.ReadWriter, 1)
list[0] = base
fmt.Printf("%v\n", list)
Write(base)
Read(base)
// cannot use list (type []io.ReadWriter) as type []io.Reader in argument to ReadMany
// ReadMany(list)
// cannot use list (type []io.ReadWriter) as type []io.Writer in argument to WriteMany
// WriteMany(list)
}