Hi everyone!
I've just read about pattern matching in Python 3.10, and it sounds really 
nice. 
I've also found out that Rust supports ranges in pattern matching.

https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html#matching-ranges-of-values-with-

fn main() {
    let x = 5;
    match x {
        1..=5 => println!("one through five"),
        _ => println!("something else"),
    }
}

Can we have something similar please? I think this would be a nice addition to 
Python's pattern matching.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/CLPYX3HUCH3J4LQEWSTBYBEXBSLJXHOO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to