|
736 | 736 | "*Dynamically create a class, optionally inheriting from `sup`, containing `fld_names`*" |
737 | 737 | ], |
738 | 738 | "text/plain": [ |
739 | | - "---\n", |
740 | | - "\n", |
741 | | - "[source](https://github.com/AnswerDotAI/fastcore/blob/main/fastcore/basics.py#L114){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
742 | | - "\n", |
743 | | - "### get_class\n", |
744 | | - "\n", |
745 | 739 | "> get_class (nm, *fld_names, sup=None, doc=None, funcs=None, anno=None,\n", |
746 | 740 | "> **flds)\n", |
747 | 741 | "\n", |
|
936 | 930 | "*Context manager to ignore exceptions*" |
937 | 931 | ], |
938 | 932 | "text/plain": [ |
939 | | - "---\n", |
940 | | - "\n", |
941 | | - "[source](https://github.com/AnswerDotAI/fastcore/blob/main/fastcore/basics.py#L158){target=\"_blank\" style=\"float:right; font-size:smaller\"}\n", |
942 | | - "\n", |
943 | | - "#### ignore_exceptions\n", |
944 | | - "\n", |
945 | 933 | "> ignore_exceptions ()\n", |
946 | 934 | "\n", |
947 | 935 | "*Context manager to ignore exceptions*" |
|
1105 | 1093 | "*Do nothing*" |
1106 | 1094 | ], |
1107 | 1095 | "text/plain": [ |
1108 | | - "---\n", |
1109 | | - "\n", |
1110 | | - "### noop\n", |
1111 | | - "\n", |
1112 | 1096 | "> noop (x=None, *args, **kwargs)\n", |
1113 | 1097 | "\n", |
1114 | 1098 | "*Do nothing*" |
|
1152 | 1136 | "*Do nothing (method)*" |
1153 | 1137 | ], |
1154 | 1138 | "text/plain": [ |
1155 | | - "---\n", |
1156 | | - "\n", |
1157 | | - "### noops\n", |
1158 | | - "\n", |
1159 | 1139 | "> noops (x=None, *args, **kwargs)\n", |
1160 | 1140 | "\n", |
1161 | 1141 | "*Do nothing (method)*" |
|
1675 | 1655 | " def __getattr__(self,k): return self[k] if k in self else stop(AttributeError(k))\n", |
1676 | 1656 | " def __setattr__(self, k, v): (self.__setitem__,super().__setattr__)[k[0]=='_'](k,v)\n", |
1677 | 1657 | " def __dir__(self): return super().__dir__() + list(self.keys())\n", |
1678 | | - " def _repr_markdown_(self): return f'```json\\n{pprint.pformat(self, indent=2)}\\n```'\n", |
| 1658 | + " def _repr_markdown_(self): return f'```python\\n{pprint.pformat(self, indent=2)}\\n```'\n", |
1679 | 1659 | " def copy(self): return AttrDict(**self)" |
1680 | 1660 | ] |
1681 | 1661 | }, |
|
1716 | 1696 | { |
1717 | 1697 | "data": { |
1718 | 1698 | "text/markdown": [ |
1719 | | - "```json\n", |
| 1699 | + "```python\n", |
1720 | 1700 | "{ 'a': 1,\n", |
1721 | 1701 | " 'b': {'c': 1, 'd': 2},\n", |
1722 | 1702 | " 'c': {'c': 1, 'd': 2},\n", |
|
7820 | 7800 | "source": [] |
7821 | 7801 | } |
7822 | 7802 | ], |
7823 | | - "metadata": {}, |
| 7803 | + "metadata": { |
| 7804 | + "kernelspec": { |
| 7805 | + "display_name": "python3", |
| 7806 | + "language": "python", |
| 7807 | + "name": "python3" |
| 7808 | + } |
| 7809 | + }, |
7824 | 7810 | "nbformat": 4, |
7825 | 7811 | "nbformat_minor": 5 |
7826 | 7812 | } |
0 commit comments