Skip to content

Add protocol object PyCallable #4654

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 5 commits into from
Mar 7, 2023
Merged

Conversation

youknowone
Copy link
Member

@youknowone youknowone commented Mar 7, 2023

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

#[inline]
pub fn is_callable(&self) -> bool {
Copy link
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,
}
Copy link
Member Author

@youknowone youknowone Mar 7, 2023

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
Copy link
Contributor

@qingshi163 qingshi163 left a comment

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