Created
June 28, 2025 21:17
-
-
Save freedomtowin/e928b838ad397fe85afd36953165b5b8 to your computer and use it in GitHub Desktop.
Example of creating a Gist using Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pub struct Comprehension { | |
pub mapping: Mapping, | |
pub for_if_clause: ForIfClause, | |
pub additional_for_if_clauses: Vec<ForIfClause>, | |
} | |
impl Parse for Comprehension { | |
fn parse(input: ParseStream) -> syn::Result<Self> { | |
Ok(Self { | |
mapping: input.parse()?, | |
for_if_clause: input.parse()?, | |
additional_for_if_clauses: parse_zero_or_more(input), | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment