Skip to content

Mini changes pulled from #2146#2194

Merged
youknowone merged 5 commits into
masterfrom
coolreader18/deque-seq
Sep 11, 2020
Merged

Mini changes pulled from #2146#2194
youknowone merged 5 commits into
masterfrom
coolreader18/deque-seq

Conversation

@coolreader18
Copy link
Copy Markdown
Member

No description provided.


#[pymethod(name = "__repr__")]
#[pymethod(magic)]
fn getitem(&self, idx: isize, vm: &VirtualMachine) -> PyResult {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh.. it even didn't have getitem

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.

Yeah, I had the same reaction 😁

Comment thread vm/src/obj/objint.rs

impl_into_pyobject_int!(isize i8 i16 i32 i64 usize u8 u16 u32 u64 BigInt);

pub fn try_to_primitive<'a, I>(i: &'a BigInt, vm: &VirtualMachine) -> PyResult<I>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment thread vm/src/cformat.rs
Some(CFormatQuantity::FromValuesTuple) => match elements.next() {
Some(width_obj) => {
tuple_index += 1;
if !objtype::isinstance(&width_obj, &vm.ctx.types.int_type) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

swapping if and else would make else block a lot cleaner.
but it seems it is not part of this PR

@youknowone youknowone merged commit e4cdb14 into master Sep 11, 2020
@youknowone youknowone deleted the coolreader18/deque-seq branch September 11, 2020 21:09
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