Skip to content

Disallow Cloning() and Override() #4706

Open
@bdbaddog

Description

@bdbaddog

This is added as a solution to the issue described in PR #4041.

Basically Override()'s are meant to be a light weight deadending copy of an Environment() typically created automatically by SCons when an env var is specialized in a Builder() call.

Here's a possible way to disallow this, from @mwichmann (from: #4041 (comment))

    def __copy__(self):
        from copy import Error

        raise Error("un(shallow)copyable object of type %s" % type(self))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions