March 2003
Intermediate to advanced
656 pages
39h 30m
English
copy
copy(x)
Creates
and returns a copy of x for
x of most types (copies of modules,
classes, frames, arrays, and internal types are not supported). If
x is immutable,
copy.copy(
x
)
may return x itself as an optimization. A
class can customize the way copy.copy copies its
instances by having a special method __copy__(self) that returns a new object, a copy of
self.
Read now
Unlock full access