Skip to content

Add sorted and list.sort #81

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

Merged
merged 10 commits into from Sep 29, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better NoneType comparison
  • Loading branch information
Tim-St committed Sep 28, 2019
commit c8d35a9130f3b828c36e3d999de14d36aabf2e1a
2 changes: 1 addition & 1 deletion py/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func init() {
ListType.Dict["sort"] = MustNewMethod("sort", func(self Object, args Tuple, kwargs StringDict) (Object, error) {
const funcName = "sort"
var l *List
if self.Type() == NoneTypeType {
if self == None {
// method called using `list.sort([], **kwargs)`
var o Object
err := UnpackTuple(args, nil, funcName, 1, 1, &o)
Expand Down