Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why isn there a generic copying operation for objects in Python?

0
10 Posted

Why isn there a generic copying operation for objects in Python?

0
10

A. Hmm. Maybe there should be one, but it’s difficult to assign a useful meaning to copying of open files, sockets and windows, or recursive data structures. As long as you design all your classes yourself you are of course free to define a standard base class that defines an overridable copying operation for all the objects you care about. (One practical point: it would have to be a built-in function, not a standard method name, since not all built-in object types have methods; e.g.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123