-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Labels
Good First IssueA good issue to take on if you're just getting started with Iris developmentA good issue to take on if you're just getting started with Iris developmentType: Enhancement
Description
✨ Feature Request
As raised by @michaelsanderson42: CubeList.copy() should return a CubeList instead of a list.
Motivation
The unspoken contract of a .copy() method is that it returns a new object of the same type.
Additional context
CubeList is currently inheriting its .copy() behaviour from the list parent class. Docs link
Details
import iris
a = iris.cube.CubeList()
b = a
c = a.copy()
type(a)
# <class 'iris.cube.CubeList'>
type(b)
# <class 'iris.cube.CubeList'>
type(c)
# <class 'list'>Replication steps
Metadata
Metadata
Assignees
Labels
Good First IssueA good issue to take on if you're just getting started with Iris developmentA good issue to take on if you're just getting started with Iris developmentType: Enhancement