## Summary https://github.com/RustPython/RustPython/pull/5892/files#r2183174081 ``` import time time.sleep(-1) ``` ## Expected raise exception <!-- What's the expected result? Using ``` ``` block is preferred for text. --> ## Actual panic <!-- What's the actual result? Using ``` ``` block is preferred for text. --> ## Python Documentation <!-- If applicable. -->
Activity
DominicPrince2003 commentedon Jul 5, 2025
Hi, can I take up this issue?
I'm planning to modify the
time.sleep()implementation to safely handle:Proposed solution:
f64input before conversionValueErrorif the input is invalidDuration::from_secs_f64()Let me know if this approach is okay.
youknowone commentedon Jul 6, 2025
Yes, that's one of the possible solutions. Thanks!