Look up submodule information by name or path. Unlike __getitem__, this returns None if the submodule is not found.
(self, name: str)
| 207 | yield self[s] |
| 208 | |
| 209 | def get(self, name: str) -> Submodule | None: |
| 210 | """ |
| 211 | Look up submodule information by name or path. |
| 212 | Unlike __getitem__, this returns None if the submodule is not found. |
| 213 | """ |
| 214 | try: |
| 215 | return self[name] |
| 216 | except KeyError: |
| 217 | return None |
| 218 | |
| 219 | def add( |
| 220 | self, |