workspace
stringclasses
1 value
channel
stringclasses
1 value
sentences
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
sentence_id
stringlengths
44
53
timestamp
float64
1.5B
1.56B
__index_level_0__
int64
0
106k
pythondev
help
but Martin is not saying there are such systems existing without any context
2019-03-05T13:19:32.639300
Jettie
pythondev_help_Jettie_2019-03-05T13:19:32.639300
1,551,791,972.6393
12,221
pythondev
help
he's saying you, as a developer of such systems, should also make such tools
2019-03-05T13:19:56.639900
Jettie
pythondev_help_Jettie_2019-03-05T13:19:56.639900
1,551,791,996.6399
12,222
pythondev
help
right. i'd love to see any existing approaches to solving these pain points, maybe to reuse, maybe to just understand the challenges better.
2019-03-05T13:21:39.641100
Rosamaria
pythondev_help_Rosamaria_2019-03-05T13:21:39.641100
1,551,792,099.6411
12,223
pythondev
help
i'd be willing to pay quite a bit for a great SaaS solution which takes care of these concerns
2019-03-05T13:22:17.642100
Rosamaria
pythondev_help_Rosamaria_2019-03-05T13:22:17.642100
1,551,792,137.6421
12,224
pythondev
help
I don't think having a generalized solution is even possible
2019-03-05T13:22:51.642500
Jettie
pythondev_help_Jettie_2019-03-05T13:22:51.642500
1,551,792,171.6425
12,225
pythondev
help
absolutely true. lets see what we can afford to de-generalize to make it possible. maybe i have to follow a particular schema of events. maybe i have to use a complimentary client library with an event broker. i will still have immense flexibility to to make all sorts of applications with that.
2019-03-05T13:26:43.646300
Rosamaria
pythondev_help_Rosamaria_2019-03-05T13:26:43.646300
1,551,792,403.6463
12,226
pythondev
help
Question: I have a `class Account` and `class InsufficientFundsError(Exception)`. Both reside in the module `account.py`. An instance of `Account` raises a `InsufficientFundsError` within a member method if a particular condition is met. In my main module, I am importing: `from account import Account`. My code in the main method calls a method with an argument that raises the `InsufficientFundsError`. And it works. Now my question: Why does it? I thought I would have to import the custom exception as well, but it works without it, too.
2019-03-05T13:51:04.651200
Dominga
pythondev_help_Dominga_2019-03-05T13:51:04.651200
1,551,793,864.6512
12,227
pythondev
help
<@Dominga> Is the code path that triggers the `InssufficientFundsError` getting run/tested? Python won’t normally cause an error until it is encountered at runtime, at which point you will get a `NameError`. Another possibility is that you have the code path wrapped in a greedy except (such as `except: ...` or `except Exception: ...`)
2019-03-05T13:57:19.654300
Clemmie
pythondev_help_Clemmie_2019-03-05T13:57:19.654300
1,551,794,239.6543
12,228
pythondev
help
<@Clemmie> Thanks for the reply, and sorry for my late response. It is being run and works as expected. I am using: ``` try: # something except InsufficientFundsError: # something ``` The error is raised by the account class in the account module and not within my code of the main module. Maybe that’s why? I am not importing the entire module, but just the class though. Which is why I am confused.
2019-03-05T14:24:04.658400
Dominga
pythondev_help_Dominga_2019-03-05T14:24:04.658400
1,551,795,844.6584
12,229
pythondev
help
So the snippet above is in your main module? Have you tested it to so that the error is actually raised by the account? If not then that `except` is not reached at runtime, and the `NameError` will not occur
2019-03-05T14:26:05.660000
Clemmie
pythondev_help_Clemmie_2019-03-05T14:26:05.660000
1,551,795,965.66
12,230
pythondev
help
put another way, run some code that will make `Account` raise that error in the main module, and then see if it still works
2019-03-05T14:26:46.660700
Clemmie
pythondev_help_Clemmie_2019-03-05T14:26:46.660700
1,551,796,006.6607
12,231
pythondev
help
I’ve expressed myself unclear. Let me rephrase: The exception is encountered at runtime and handled properly. The handler is in the account class. The main module just calls a void method of the account class. If as a result of this method, the account’s attribute would be set below 0, the InsufficientFundsError is raised within the account class, by the account class. actual snippet (excluding docstrings for brevity: ``` class Account(...) ... def withdraw(self, amount): amount = abs(amount) new_balance = self.get_balance() - amount try: self.set_balance(new_balance) except InsufficientFundsError: print(f"Insufficient funds. The amount of ${amount:,.2f} was not withdrawn.") else: print(f"The amount of ${amount:,.2f} was withdrawn successfully.\n") # method that raises the exception def set_balance(self, balance): if not isinstance(balance, (int, float)): raise ValueError("The balance needs to be either an int or a float.") elif balance &lt; 0: raise InsufficientFundsError("An account can't have a negative balance.") else: self.__balance = balance ```
2019-03-05T14:35:55.666500
Dominga
pythondev_help_Dominga_2019-03-05T14:35:55.666500
1,551,796,555.6665
12,232
pythondev
help
so you're saying the instance of the class raised the exception inside itself, and then caught it inside itself
2019-03-05T14:38:39.668900
Ashley
pythondev_help_Ashley_2019-03-05T14:38:39.668900
1,551,796,719.6689
12,233
pythondev
help
So the class `InsufficientFundsError` itself never shows up in the main module, correct? That means the python import stack is working correctly. You only have to import classes that you explicitly use, in this case you are importing `Account`, which correctly (itself) handles the import/reference to `InsufficientFundsError`
2019-03-05T14:39:16.669600
Clemmie
pythondev_help_Clemmie_2019-03-05T14:39:16.669600
1,551,796,756.6696
12,234
pythondev
help
Are there any good open source python frameworks that I can ease myself into?
2019-03-05T15:07:19.670200
Earleen
pythondev_help_Earleen_2019-03-05T15:07:19.670200
1,551,798,439.6702
12,235
pythondev
help
Maybe smaller libraries
2019-03-05T15:08:02.670700
Earleen
pythondev_help_Earleen_2019-03-05T15:08:02.670700
1,551,798,482.6707
12,236
pythondev
help
Do you mean to use, or contribute to?
2019-03-05T15:08:16.671100
Clemmie
pythondev_help_Clemmie_2019-03-05T15:08:16.671100
1,551,798,496.6711
12,237
pythondev
help
in terms of making contributions
2019-03-05T15:08:18.671300
Earleen
pythondev_help_Earleen_2019-03-05T15:08:18.671300
1,551,798,498.6713
12,238
pythondev
help
also, what are your preferred domains (web, data, graphics, games……)
2019-03-05T15:08:39.671700
Clemmie
pythondev_help_Clemmie_2019-03-05T15:08:39.671700
1,551,798,519.6717
12,239
pythondev
help
I enjoy backend, algorithms
2019-03-05T15:10:15.672200
Earleen
pythondev_help_Earleen_2019-03-05T15:10:15.672200
1,551,798,615.6722
12,240
pythondev
help
Organizing code, documentation
2019-03-05T15:10:38.672600
Earleen
pythondev_help_Earleen_2019-03-05T15:10:38.672600
1,551,798,638.6726
12,241
pythondev
help
Usually the best is a library that you have used and have some sense of
2019-03-05T15:13:53.673100
Clemmie
pythondev_help_Clemmie_2019-03-05T15:13:53.673100
1,551,798,833.6731
12,242
pythondev
help
There are tens of thousands of smaller python libraries, it would be hard to just suggest one out of thin air
2019-03-05T15:14:46.674100
Clemmie
pythondev_help_Clemmie_2019-03-05T15:14:46.674100
1,551,798,886.6741
12,243
pythondev
help
I know `selenium` is pretty popular, but has a huge need for python documentation
2019-03-05T15:23:13.674700
Ashley
pythondev_help_Ashley_2019-03-05T15:23:13.674700
1,551,799,393.6747
12,244
pythondev
help
Hey everyone, is there a way to get pip to send a flag to a module's setup.py?
2019-03-05T15:26:33.675400
Almeda
pythondev_help_Almeda_2019-03-05T15:26:33.675400
1,551,799,593.6754
12,245
pythondev
help
I have a similar issue where I'd like to install some, but not all, dependencies in develop mode. Is there an easy way to do it within setuptools or pip?
2019-03-05T15:29:18.676200
Hildegard
pythondev_help_Hildegard_2019-03-05T15:29:18.676200
1,551,799,758.6762
12,246
pythondev
help
Are you using something like pip install -r requirements.txt to build out the environment?
2019-03-05T15:30:44.677100
Almeda
pythondev_help_Almeda_2019-03-05T15:30:44.677100
1,551,799,844.6771
12,247
pythondev
help
right now I am, but I'd like to move the dependencies into setup.py for a proper package
2019-03-05T15:31:41.677800
Hildegard
pythondev_help_Hildegard_2019-03-05T15:31:41.677800
1,551,799,901.6778
12,248
pythondev
help
<@Clemmie> Thank you very much. That was helpful.
2019-03-05T15:33:26.678200
Dominga
pythondev_help_Dominga_2019-03-05T15:33:26.678200
1,551,800,006.6782
12,249
pythondev
help
For the requirements-driven method, you can reference another requirements file by putting the -r &lt;some other file&gt; right in the .txt file, and split them out into "full" and "development" requirements. More on that at <https://stackoverflow.com/questions/36744143/how-can-i-define-multiple-requirement-files> I'm less sure about doing it through setup.py.
2019-03-05T15:35:17.680900
Almeda
pythondev_help_Almeda_2019-03-05T15:35:17.680900
1,551,800,117.6809
12,250
pythondev
help
Brett Cannon does some trickery with the dependencies in setup.py here <https://snarky.ca/clarifying-pep-518/> , and I thought I could somehow extend this idea. Have a list of the "internal" packages that I might need to hack on and install them in develop mode.
2019-03-05T15:35:18.681100
Hildegard
pythondev_help_Hildegard_2019-03-05T15:35:18.681100
1,551,800,118.6811
12,251
pythondev
help
If you don't mind me asking, what's the use case? Usually you're trying to go the other way around, where your dev environment has more packages than you want distributed.
2019-03-05T15:38:04.682000
Almeda
pythondev_help_Almeda_2019-03-05T15:38:04.682000
1,551,800,284.682
12,252
pythondev
help
team harmony :wink:
2019-03-05T16:04:17.682600
Hildegard
pythondev_help_Hildegard_2019-03-05T16:04:17.682600
1,551,801,857.6826
12,253
pythondev
help
The idea is that we have a variety of internal packages that serve as libraries for a project. Sometimes a dev wants to be able to fiddle with one of the underlying libraries, as you would in develop mode.
2019-03-05T16:06:58.685100
Hildegard
pythondev_help_Hildegard_2019-03-05T16:06:58.685100
1,551,802,018.6851
12,254
pythondev
help
the team harmony part is finding a single way of defining the dependencies that serves 1) the guy who doesn't care about the supporting libs, wants to treat them like blessed versions and is ok waiting 15 mins to pull in a new build, and 2) the gal who manually fiddles with PYTHONPATH for "control" because they need may need to work on all 15 libraries
2019-03-05T16:11:18.688200
Hildegard
pythondev_help_Hildegard_2019-03-05T16:11:18.688200
1,551,802,278.6882
12,255
pythondev
help
Just looked at a neat walkthrough here: <https://realpython.com/modern-web-automation-with-python-and-selenium/>
2019-03-05T16:13:01.689000
Rosemarie
pythondev_help_Rosemarie_2019-03-05T16:13:01.689000
1,551,802,381.689
12,256
pythondev
help
doing `-e` in requirements.txt files gets close, but I think it would be ideal to specify things in `setup.py` and have a flag for dev power install for user 2 vs package install for user 1
2019-03-05T16:13:32.690200
Hildegard
pythondev_help_Hildegard_2019-03-05T16:13:32.690200
1,551,802,412.6902
12,257
pythondev
help
interesting writeup, although selenium is more of a test automation tool, as it's meant to emulate user interaction. It's not a very good scraping tool.
2019-03-05T16:23:40.690500
Ashley
pythondev_help_Ashley_2019-03-05T16:23:40.690500
1,551,803,020.6905
12,258
pythondev
help
<@Hildegard> Why not just host a private PyPI server?
2019-03-05T16:24:46.691100
Ashley
pythondev_help_Ashley_2019-03-05T16:24:46.691100
1,551,803,086.6911
12,259
pythondev
help
oh sorry, misread
2019-03-05T16:25:43.691300
Ashley
pythondev_help_Ashley_2019-03-05T16:25:43.691300
1,551,803,143.6913
12,260
pythondev
help
nevermind
2019-03-05T16:25:45.691500
Ashley
pythondev_help_Ashley_2019-03-05T16:25:45.691500
1,551,803,145.6915
12,261
pythondev
help
but if you want to go that route, you should probably split things into separate pacakges
2019-03-05T16:26:52.692000
Ashley
pythondev_help_Ashley_2019-03-05T16:26:52.692000
1,551,803,212.692
12,262
pythondev
help
each with their own dependencies
2019-03-05T16:27:01.692300
Ashley
pythondev_help_Ashley_2019-03-05T16:27:01.692300
1,551,803,221.6923
12,263
pythondev
help
I see that the Pillow project (only picking on them because I'm neck-deep in their source anyway) uses setup.py for its distribution, but a separate requirements.txt for its development, and its requirements.txt uses -e flags for local modules.
2019-03-05T16:33:28.695300
Almeda
pythondev_help_Almeda_2019-03-05T16:33:28.695300
1,551,803,608.6953
12,264
pythondev
help
:+1::skin-tone-2:
2019-03-05T16:33:36.695400
Rosemarie
pythondev_help_Rosemarie_2019-03-05T16:33:36.695400
1,551,803,616.6954
12,265
pythondev
help
So your power user would just have to run pip install on the requirements file
2019-03-05T16:34:25.696200
Almeda
pythondev_help_Almeda_2019-03-05T16:34:25.696200
1,551,803,665.6962
12,266
pythondev
help
is it common to convert result of `map` `filter` to list in order to call `len` on it?
2019-03-05T16:39:05.697500
Lanny
pythondev_help_Lanny_2019-03-05T16:39:05.697500
1,551,803,945.6975
12,267
pythondev
help
Yes! Generally it's only a good idea if know it will be relatively small.
2019-03-05T16:43:56.697900
Lillia
pythondev_help_Lillia_2019-03-05T16:43:56.697900
1,551,804,236.6979
12,268
pythondev
help
Otherwise you risk really using a lot of CPU and memory just to get a `len` call.
2019-03-05T16:44:23.698100
Lillia
pythondev_help_Lillia_2019-03-05T16:44:23.698100
1,551,804,263.6981
12,269
pythondev
help
So the below class, when doing something like this: ``` revl_vpc = RELV_VPC(t, cluster_name, params) print(type(revl_vpc.subnets)) print(type(revl_vpc.private_subnets)) print(type(revl_vpc.public_subnets)) print(type(revl_vpc.private_subnets + revl_vpc.public_subnets)) ``` why is it that for the `revl_vpc.subnets` it prints a `class 'method'` while the others print `list` (which is what I want).
2019-03-05T16:46:01.698300
Carlota
pythondev_help_Carlota_2019-03-05T16:46:01.698300
1,551,804,361.6983
12,270
pythondev
help
You're making a direct reference to the subnets method. Try .subnets() or putting the @property decorator just above def subnets.
2019-03-05T16:47:43.698700
Almeda
pythondev_help_Almeda_2019-03-05T16:47:43.698700
1,551,804,463.6987
12,271
pythondev
help
gotcha!
2019-03-05T16:47:58.698900
Carlota
pythondev_help_Carlota_2019-03-05T16:47:58.698900
1,551,804,478.6989
12,272
pythondev
help
thanks.
2019-03-05T17:19:58.699400
Lanny
pythondev_help_Lanny_2019-03-05T17:19:58.699400
1,551,806,398.6994
12,273
pythondev
help
Hi all. I am trying to import twitter in order to call the rest API, but when I am running the script I am getting this error:
2019-03-05T17:32:24.700700
Susie
pythondev_help_Susie_2019-03-05T17:32:24.700700
1,551,807,144.7007
12,274
pythondev
help
```import twitter ModuleNotFoundError: No module named 'twitter'```
2019-03-05T17:32:27.700900
Susie
pythondev_help_Susie_2019-03-05T17:32:27.700900
1,551,807,147.7009
12,275
pythondev
help
I tried to `pip3 uninstall twitter` and install from the source
2019-03-05T17:32:55.701500
Susie
pythondev_help_Susie_2019-03-05T17:32:55.701500
1,551,807,175.7015
12,276
pythondev
help
by downloading the tar.gz
2019-03-05T17:33:04.701800
Susie
pythondev_help_Susie_2019-03-05T17:33:04.701800
1,551,807,184.7018
12,277
pythondev
help
but still get the same error
2019-03-05T17:33:10.702000
Susie
pythondev_help_Susie_2019-03-05T17:33:10.702000
1,551,807,190.702
12,278
pythondev
help
any thoughts?
2019-03-05T17:33:19.702300
Susie
pythondev_help_Susie_2019-03-05T17:33:19.702300
1,551,807,199.7023
12,279
pythondev
help
does 'from twitter import *' work?
2019-03-05T17:37:28.702900
Deon
pythondev_help_Deon_2019-03-05T17:37:28.702900
1,551,807,448.7029
12,280
pythondev
help
assuming it installed correctly my first guess would be that its' not on your path
2019-03-05T17:48:54.703600
Joette
pythondev_help_Joette_2019-03-05T17:48:54.703600
1,551,808,134.7036
12,281
pythondev
help
how are you executing your script? `python3 some_script.py`?
2019-03-05T17:49:34.704500
Joette
pythondev_help_Joette_2019-03-05T17:49:34.704500
1,551,808,174.7045
12,282
pythondev
help
<@Deon> doesnt work
2019-03-05T17:55:56.704800
Susie
pythondev_help_Susie_2019-03-05T17:55:56.704800
1,551,808,556.7048
12,283
pythondev
help
<@Joette>./some_script.py
2019-03-05T17:56:20.705200
Susie
pythondev_help_Susie_2019-03-05T17:56:20.705200
1,551,808,580.7052
12,284
pythondev
help
its friking `python2 some_script.py`
2019-03-05T17:57:19.706400
Susie
pythondev_help_Susie_2019-03-05T17:57:19.706400
1,551,808,639.7064
12,285
pythondev
help
its working now
2019-03-05T17:57:25.706800
Susie
pythondev_help_Susie_2019-03-05T17:57:25.706800
1,551,808,645.7068
12,286
pythondev
help
thought so
2019-03-05T17:57:27.707000
Joette
pythondev_help_Joette_2019-03-05T17:57:27.707000
1,551,808,647.707
12,287
pythondev
help
thanks for the impulse guys
2019-03-05T17:57:35.707200
Susie
pythondev_help_Susie_2019-03-05T17:57:35.707200
1,551,808,655.7072
12,288
pythondev
help
much appreciated
2019-03-05T17:57:45.707600
Susie
pythondev_help_Susie_2019-03-05T17:57:45.707600
1,551,808,665.7076
12,289
pythondev
help
enjoy your evening of Twitter API'ing
2019-03-05T17:57:51.707800
Joette
pythondev_help_Joette_2019-03-05T17:57:51.707800
1,551,808,671.7078
12,290
pythondev
help
thx
2019-03-05T17:57:58.708000
Susie
pythondev_help_Susie_2019-03-05T17:57:58.708000
1,551,808,678.708
12,291
pythondev
help
Hi, everyone - I have a regex pattern that looks for SQL tables following a from|into|join, but I am having a hard time with the space between the keyword and the table name. Is there anyway to capture the `\s` before the table name, but not include it? my example: <https://regex101.com/r/In747J/2>
2019-03-05T18:28:37.710500
Shirley
pythondev_help_Shirley_2019-03-05T18:28:37.710500
1,551,810,517.7105
12,292
pythondev
help
sounds like you want a capture group, put the table name part in parens
2019-03-05T18:30:44.711200
Hildegard
pythondev_help_Hildegard_2019-03-05T18:30:44.711200
1,551,810,644.7112
12,293
pythondev
help
or put the space in the lookbehind and wrap the keyword options in a non-capturing group `(?: ... )`.
2019-03-05T18:33:54.712400
Hildegard
pythondev_help_Hildegard_2019-03-05T18:33:54.712400
1,551,810,834.7124
12,294
pythondev
help
I tried the lookbehind, but it complains that lookbehinds need to be a fixed width
2019-03-05T18:38:00.712800
Shirley
pythondev_help_Shirley_2019-03-05T18:38:00.712800
1,551,811,080.7128
12,295
pythondev
help
and it is hard to account for the table pattern as it can be a varying mix of `db.shcema.table`, `shcema.table`, `#table`, etc.
2019-03-05T18:39:46.713800
Shirley
pythondev_help_Shirley_2019-03-05T18:39:46.713800
1,551,811,186.7138
12,296
pythondev
help
ah right, <@Shirley>, so capture the table name in a capture group `(&lt;tablename_regex&gt;)`. depending on how full strength you want this to be, you might end up needing a real parser. i give up on regexes if the syntax is detailed and i need something really robust.
2019-03-05T18:56:26.716000
Hildegard
pythondev_help_Hildegard_2019-03-05T18:56:26.716000
1,551,812,186.716
12,297
pythondev
help
yeah, I might leave it as is and just `.strip()` it after words
2019-03-05T18:58:47.716400
Shirley
pythondev_help_Shirley_2019-03-05T18:58:47.716400
1,551,812,327.7164
12,298
pythondev
help
Still not sure the difference between 'docstrings' and 'comments' ?
2019-03-05T19:45:16.717600
Clayton
pythondev_help_Clayton_2019-03-05T19:45:16.717600
1,551,815,116.7176
12,299
pythondev
help
Keep getting the following error: `TypeError: can only concatenate str (not "ImportValue") to str`. Not sure how I can insert the `eks_cluster_name`.
2019-03-05T19:47:21.717800
Carlota
pythondev_help_Carlota_2019-03-05T19:47:21.717800
1,551,815,241.7178
12,300
pythondev
help
<@Clayton> A docstring is a Python literal quoted string in a specific position, like the start of a function, which is available to the software at runtime for help commands, etc. A comment, using `#`, can be sprinkled anywhere in the code, but it's invisible except to a human reading those lines. So the former is usually used for documentation, and the latter for notes to developers maintaining the app.
2019-03-05T19:52:40.720800
Sasha
pythondev_help_Sasha_2019-03-05T19:52:40.720800
1,551,815,560.7208
12,301
pythondev
help
is it like logging ?
2019-03-05T19:53:07.721100
Clayton
pythondev_help_Clayton_2019-03-05T19:53:07.721100
1,551,815,587.7211
12,302
pythondev
help
No, it's just fixed text, embedded in the program. Logging would be dynamic output.
2019-03-05T19:55:05.722000
Sasha
pythondev_help_Sasha_2019-03-05T19:55:05.722000
1,551,815,705.722
12,303
pythondev
help
isnt the stack trace enough for troubleshooting errors ?
2019-03-05T19:55:45.722600
Clayton
pythondev_help_Clayton_2019-03-05T19:55:45.722600
1,551,815,745.7226
12,304
pythondev
help
Well, that will tell you where an error was encountered, but not what the code was doing or why. Compare `x += (len(data) + 9) // 10` with `x += (len(data) + 9) // 10 # Split rows into batches of 10, rounded up`.
2019-03-05T19:59:20.724900
Sasha
pythondev_help_Sasha_2019-03-05T19:59:20.724900
1,551,815,960.7249
12,305
pythondev
help
like a debugger output ?
2019-03-05T20:00:12.725300
Clayton
pythondev_help_Clayton_2019-03-05T20:00:12.725300
1,551,816,012.7253
12,306
pythondev
help
No, it's just a note from the programmer explaining what they were thinking, etc. or clarifying something which works but might be confusing to understand how it works.
2019-03-05T20:01:00.726200
Sasha
pythondev_help_Sasha_2019-03-05T20:01:00.726200
1,551,816,060.7262
12,307
pythondev
help
comment = what the code does , docstring = why it it does what it does
2019-03-05T20:01:49.727000
Clayton
pythondev_help_Clayton_2019-03-05T20:01:49.727000
1,551,816,109.727
12,308
pythondev
help
It's more like docstring = what this function does, why you might want to call it, and what the parameters mean. Comment = how the function was implemented, in case you need to change how it works.
2019-03-05T20:08:49.728500
Sasha
pythondev_help_Sasha_2019-03-05T20:08:49.728500
1,551,816,529.7285
12,309
pythondev
help
Ive been reading about it and i still dont see anything that really elevates it above comments
2019-03-05T20:18:32.729800
Clayton
pythondev_help_Clayton_2019-03-05T20:18:32.729800
1,551,817,112.7298
12,310
pythondev
help
The main difference is that it's accessible at runtime through `__doc__`, and is a standard place to look for documentation.
2019-03-05T20:24:58.730800
Sasha
pythondev_help_Sasha_2019-03-05T20:24:58.730800
1,551,817,498.7308
12,311
pythondev
help
i saw that, you access it through the ipyhon / interactive prompt. why not just look at the script to see the docstrings. just dont get really get it
2019-03-05T20:34:33.732000
Clayton
pythondev_help_Clayton_2019-03-05T20:34:33.732000
1,551,818,073.732
12,312
pythondev
help
¯\_(ツ)_/¯
2019-03-05T20:35:55.732400
Sasha
pythondev_help_Sasha_2019-03-05T20:35:55.732400
1,551,818,155.7324
12,313
pythondev
help
Consider documentation builders like Sphinx
2019-03-05T20:39:10.733400
Hiroko
pythondev_help_Hiroko_2019-03-05T20:39:10.733400
1,551,818,350.7334
12,314
pythondev
help
&gt;&gt;&gt; Docstrings versus Block comments These aren’t interchangeable. For a function or class, the leading comment block is a programmer’s note. The docstring describes the operation of the function or class
2019-03-05T20:41:30.733700
Hiroko
pythondev_help_Hiroko_2019-03-05T20:41:30.733700
1,551,818,490.7337
12,315
pythondev
help
<https://docs.python-guide.org/writing/documentation/>
2019-03-05T20:41:48.733900
Hiroko
pythondev_help_Hiroko_2019-03-05T20:41:48.733900
1,551,818,508.7339
12,316
pythondev
help
<@Clayton> :point_up:
2019-03-05T20:42:14.734200
Hiroko
pythondev_help_Hiroko_2019-03-05T20:42:14.734200
1,551,818,534.7342
12,317
pythondev
help
Thanks, <@Hiroko>. I hadn't run across Doctest before... that's a cute hack.
2019-03-05T20:45:54.734700
Sasha
pythondev_help_Sasha_2019-03-05T20:45:54.734700
1,551,818,754.7347
12,318
pythondev
help
The access to docstrings also makes it so ide can easily show you docs of functions you're calling. The fact that it's part of the language means the tooling can all work with it. The comments are not as easily accessible programmatically
2019-03-05T20:54:11.736600
Bethany
pythondev_help_Bethany_2019-03-05T20:54:11.736600
1,551,819,251.7366
12,319
pythondev
help
Other languages don't all have a standard like this. It's big QoL improvement
2019-03-05T20:55:05.737300
Bethany
pythondev_help_Bethany_2019-03-05T20:55:05.737300
1,551,819,305.7373
12,320