ᴅʀ. ᴍᴏᴡɪɴᴄᴋᴇʟ'ꜱ on Nostr: As I'm dabbling in #python. A thing I struggle with is not having a mental model for ...
As I'm dabbling in #python. A thing I struggle with is not having a mental model for when I wrap an object in a function, compared to having an object.function() call. Like, what is the difference between them and how do I know which is which?
len(object)
object.sort()
Published at
2024-11-12 09:39:41Event JSON
{
"id": "1ef89b8b00efd438ed1a5f890cebdb58f42ab17c242357ce4cf5996ddb272bb3",
"pubkey": "603d8f0ab17459820f2c5ebfb5b48d0a2dbdefa5e89afde2a095b09cb94aeafb",
"created_at": 1731404381,
"kind": 1,
"tags": [
[
"t",
"python"
],
[
"proxy",
"https://fosstodon.org/users/Drmowinckels/statuses/113469317555213275",
"activitypub"
]
],
"content": "As I'm dabbling in #python. A thing I struggle with is not having a mental model for when I wrap an object in a function, compared to having an object.function() call. Like, what is the difference between them and how do I know which is which?\n\nlen(object)\nobject.sort()",
"sig": "c5e335d133b8a7b5c7cbd3ea9500fb8a51f78f6aabd4e400fa6e976c3ab06307936d90bbeb206bf59a75fd9f1acb0a818dcf405a7b94c95b00eacac12e750433"
}