Skip to content

Add protocol object PyCallable#4654

Merged
youknowone merged 5 commits into
RustPython:mainfrom
youknowone:pycallble
Mar 7, 2023
Merged

Add protocol object PyCallable#4654
youknowone merged 5 commits into
RustPython:mainfrom
youknowone:pycallble

Conversation

@youknowone

@youknowone youknowone commented Mar 7, 2023

Copy link
Copy Markdown
Member

@youknowone youknowone marked this pull request as ready for review March 7, 2023 10:45
}

#[inline]
pub fn is_callable(&self) -> bool {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new is_callable doesn't require vm argument anymore

Comment on lines +38 to +42
/// Trace events for sys.settrace and sys.setprofile.
enum TraceEvent {
Call,
Return,
}

@youknowone youknowone Mar 7, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relocated TraceEvent because it is use only to call functions now.
if it will be going to be used somewhere else, i will create vm/src/trace.rs rather than putting it in vm.rs

@youknowone youknowone changed the title PyCallable Add protocol object PyCallable Mar 7, 2023

@qingshi163 qingshi163 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great

@youknowone youknowone merged commit 5a74f08 into RustPython:main Mar 7, 2023
@youknowone youknowone deleted the pycallble branch March 7, 2023 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants