-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates for Regions inputs #527
Conversation
8799ee2
to
bcd7767
Compare
@@ -24,7 +24,13 @@ class Regions: | |||
The list of region objects. | |||
""" | |||
|
|||
def __init__(self, regions): | |||
def __init__(self, regions=(), /): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the /
for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It forces the input to be positional only. So Regions(regions=...)
is not allowed. list
does exactly the same thing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
This PR updates the
Regions
class as follows:Regions()
Regions
object and itsappend
andextend
methodsRegions.extend
now accepts aRegions
objectCloses: #508
Closes: #509
Closes: #510
CC: @pllim