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
it's probably better to use extend_enum in that case
2017-10-19T11:18:42.000783
Winnie
pythondev_help_Winnie_2017-10-19T11:18:42.000783
1,508,411,922.000783
97,503
pythondev
help
extend_enum?
2017-10-19T11:19:28.000875
Antionette
pythondev_help_Antionette_2017-10-19T11:19:28.000875
1,508,411,968.000875
97,504
pythondev
help
Ah, the class method was what I was getting wrong earlier. Thanks for that.
2017-10-19T11:21:20.000581
Meghan
pythondev_help_Meghan_2017-10-19T11:21:20.000581
1,508,412,080.000581
97,505
pythondev
help
<@Antionette> <https://stackoverflow.com/a/35899963>
2017-10-19T11:21:51.000285
Winnie
pythondev_help_Winnie_2017-10-19T11:21:51.000285
1,508,412,111.000285
97,506
pythondev
help
ah sure, that looks like its a much more fleshed out version
2017-10-19T11:26:46.000264
Antionette
pythondev_help_Antionette_2017-10-19T11:26:46.000264
1,508,412,406.000264
97,507
pythondev
help
<@Sirena> were you typing something?
2017-10-19T11:37:18.000470
Winnie
pythondev_help_Winnie_2017-10-19T11:37:18.000470
1,508,413,038.00047
97,508
pythondev
help
Here's how the enum class adds the initial members so you might be able to wrap that into the add method I posted above if the library doesn't work out for some reason
2017-10-19T11:38:31.000556
Antionette
pythondev_help_Antionette_2017-10-19T11:38:31.000556
1,508,413,111.000556
97,509
pythondev
help
<https://github.com/python/cpython/blob/3.4/Lib/enum.py#L139>
2017-10-19T11:38:32.000282
Antionette
pythondev_help_Antionette_2017-10-19T11:38:32.000282
1,508,413,112.000282
97,510
pythondev
help
<@Antionette> intresting, thanks :slightly_smiling_face:
2017-10-19T11:40:30.000264
Winnie
pythondev_help_Winnie_2017-10-19T11:40:30.000264
1,508,413,230.000264
97,511
pythondev
help
``` from enum import Enum class ExtendableEnum(Enum): @classmethod def add(cls, name, val=None): # keys_len = len(cls.__members__) + 1 if not val: val = len(cls.__members__) + 1 new_key = name cls.__dict__['_member_map_'][new_key] = val cls.__dict__['_member_names_'].append(new_key) cls.__dict__['_value2member_map_'][val] = new_key class NewColors(ExtendableEnum): RED = 1 GREEN = 2 # add a color, show that it works print(NewColors(2)) NewColors.add('CYAN', 3) print(NewColors(3)) print(NewColors.CYAN) # add a duplicate color, this can be problematic NewColors.add('TURQUOISE') print(NewColors.TURQUOISE, NewColors(4)) NewColors.add('TURQUOISE') print(NewColors.TURQUOISE) print(NewColors(4), NewColors(5)) ``` ``` 4 TURQUOISE 5 TURQUOISE TURQUOISE ``` <@Antionette> It works, but if you add a duplicate it gets confusing.
2017-10-19T11:43:08.000308
Meghan
pythondev_help_Meghan_2017-10-19T11:43:08.000308
1,508,413,388.000308
97,512
pythondev
help
I was, but I've deleted it a couple times since I'm having trouble phrasing what I'm thinking
2017-10-19T11:43:18.000071
Sirena
pythondev_help_Sirena_2017-10-19T11:43:18.000071
1,508,413,398.000071
97,513
pythondev
help
You were using Custom#, which avoids the duplicates though.
2017-10-19T11:43:30.000035
Meghan
pythondev_help_Meghan_2017-10-19T11:43:30.000035
1,508,413,410.000035
97,514
pythondev
help
Would need to check if the name already exists first. But, otherwise I think that should do what Evan is requesting.
2017-10-19T11:44:02.000587
Meghan
pythondev_help_Meghan_2017-10-19T11:44:02.000587
1,508,413,442.000587
97,515
pythondev
help
Yeah I wasn't sure if a name was actually being supplied or just the color code
2017-10-19T11:44:29.000286
Antionette
pythondev_help_Antionette_2017-10-19T11:44:29.000286
1,508,413,469.000286
97,516
pythondev
help
Essentially, I would say that an enum that is mutable isn't terribly enum-like. I get that you would prefer backward compatibility, but when you extend an enum, you sortof break the agreement you have with the code that an enum is always one set of options
2017-10-19T11:46:35.000446
Sirena
pythondev_help_Sirena_2017-10-19T11:46:35.000446
1,508,413,595.000446
97,517
pythondev
help
``` class ExtendableEnum(Enum): @classmethod def add(cls, name, val=None): if name not in cls.__members__: if not val: val = len(cls.__members__) + 1 new_key = name cls.__dict__['_member_map_'][new_key] = val cls.__dict__['_member_names_'].append(new_key) cls.__dict__['_value2member_map_'][val] = new_key ``` This should work, other than value can't be changed once an item is created. Which I think is what you would want.
2017-10-19T11:46:40.000291
Meghan
pythondev_help_Meghan_2017-10-19T11:46:40.000291
1,508,413,600.000291
97,518
pythondev
help
<@Sirena> I agree
2017-10-19T11:47:09.000406
Winnie
pythondev_help_Winnie_2017-10-19T11:47:09.000406
1,508,413,629.000406
97,519
pythondev
help
And it does look like some of the other models are based on other datatypes so if the refactoring isn't too bad I don't think the maintainers should mind
2017-10-19T11:48:58.000379
Antionette
pythondev_help_Antionette_2017-10-19T11:48:58.000379
1,508,413,738.000379
97,520
pythondev
help
My biggest peeve with this module is camelcase
2017-10-19T11:49:59.000539
Winnie
pythondev_help_Winnie_2017-10-19T11:49:59.000539
1,508,413,799.000539
97,521
pythondev
help
but yeah this module needs a complete style do-over
2017-10-19T11:50:18.000301
Winnie
pythondev_help_Winnie_2017-10-19T11:50:18.000301
1,508,413,818.000301
97,522
pythondev
help
yeah, some habits never die. Just gotta hold your nose if you can't talk the maintainer into changing it though
2017-10-19T11:51:28.000231
Sirena
pythondev_help_Sirena_2017-10-19T11:51:28.000231
1,508,413,888.000231
97,523
pythondev
help
Anyways, thank you all for the massive help in this issue :slightly_smiling_face: <@Sirena> <@Antionette> <@Meghan> <@Collette> <@Scot> <@Meg>
2017-10-19T12:00:11.000058
Winnie
pythondev_help_Winnie_2017-10-19T12:00:11.000058
1,508,414,411.000058
97,524
pythondev
help
hopefully it works out well for you <@Winnie>
2017-10-19T12:02:37.000517
Sirena
pythondev_help_Sirena_2017-10-19T12:02:37.000517
1,508,414,557.000517
97,525
pythondev
help
Hi Django community! I'm just picking up Django and have a related question. I'd like to user Postgresql as the db source and I'm a little confused. Is this the right approach: 1. Install Postgrsql server (MacOS) 2. pip install `psycopg2` 3. run migration
2017-10-19T12:19:14.000120
Gerardo
pythondev_help_Gerardo_2017-10-19T12:19:14.000120
1,508,415,554.00012
97,526
pythondev
help
Hey <@Gerardo> You might have more luck in <#C0LMFRMB5|django>
2017-10-19T12:19:44.000597
Winnie
pythondev_help_Winnie_2017-10-19T12:19:44.000597
1,508,415,584.000597
97,527
pythondev
help
oops I thought I was in django. Thanks <@Winnie>
2017-10-19T12:20:14.000491
Gerardo
pythondev_help_Gerardo_2017-10-19T12:20:14.000491
1,508,415,614.000491
97,528
pythondev
help
hello, is possible to explicitly import `*.pyi` files with containing definitions without having actual `*py` file nearby? As an example, TypeScript use such technique to define interfaces that are used only on compilation time, but not available at runtime.
2017-10-19T12:28:25.000188
Kellye
pythondev_help_Kellye_2017-10-19T12:28:25.000188
1,508,416,105.000188
97,529
pythondev
help
Does anyone have any good resources for pytest for a newbie trying to wrap my head around it
2017-10-19T12:46:22.000204
Burma
pythondev_help_Burma_2017-10-19T12:46:22.000204
1,508,417,182.000204
97,530
pythondev
help
pytest docs? they have a "Getting started" section
2017-10-19T12:48:14.000340
Suellen
pythondev_help_Suellen_2017-10-19T12:48:14.000340
1,508,417,294.00034
97,531
pythondev
help
Thanks <@Suellen> I'll give it a try
2017-10-19T12:50:41.000051
Burma
pythondev_help_Burma_2017-10-19T12:50:41.000051
1,508,417,441.000051
97,532
pythondev
help
seems like a steep learning curve for a newbie
2017-10-19T12:51:07.000320
Burma
pythondev_help_Burma_2017-10-19T12:51:07.000320
1,508,417,467.00032
97,533
pythondev
help
I mean, most of the stuff that you would normally use is on the first 10-20 pages
2017-10-19T12:51:36.000256
Suellen
pythondev_help_Suellen_2017-10-19T12:51:36.000256
1,508,417,496.000256
97,534
pythondev
help
Yea seems little intimidating I'll give it a try basically I would want to run series of queries against an API . which would return the status bunch of nodes
2017-10-19T12:57:17.000128
Burma
pythondev_help_Burma_2017-10-19T12:57:17.000128
1,508,417,837.000128
97,535
pythondev
help
which would send the data to a database
2017-10-19T12:58:08.000759
Burma
pythondev_help_Burma_2017-10-19T12:58:08.000759
1,508,417,888.000759
97,536
pythondev
help
to display within a web browser
2017-10-19T12:59:07.000173
Burma
pythondev_help_Burma_2017-10-19T12:59:07.000173
1,508,417,947.000173
97,537
pythondev
help
is pytest overkill for such a task ?
2017-10-19T12:59:42.000127
Burma
pythondev_help_Burma_2017-10-19T12:59:42.000127
1,508,417,982.000127
97,538
pythondev
help
pytest will work great for that
2017-10-19T13:01:52.000176
Winnifred
pythondev_help_Winnifred_2017-10-19T13:01:52.000176
1,508,418,112.000176
97,539
pythondev
help
<@Kellye> what would you do with the .pyi files after you imported them? In most senses compilation time _is_ runtime, and .pyi is mostly just used for static analysis AFAIK
2017-10-19T13:20:21.000417
Sirena
pythondev_help_Sirena_2017-10-19T13:20:21.000417
1,508,419,221.000417
97,540
pythondev
help
from PEP484: &gt;&gt;&gt;While stub files are syntactically valid Python modules, they use the .pyi extension to make it possible to maintain stub files in the same directory as the corresponding real module. This also reinforces the notion that no runtime behavior should be expected of stub files.
2017-10-19T13:21:56.000380
Sirena
pythondev_help_Sirena_2017-10-19T13:21:56.000380
1,508,419,316.00038
97,541
pythondev
help
<@Sirena> that's true, that's why I need them, I want to use custom types from *.pyi files as contracts to function calls. For example defining custom model like ``` class MyModel: myProperty:int ``` then I could use it as parameter type in function. I assume mypy can detect that anonymous object follow contract of that virtual type from *.pyi file. like: `def func(value:MyModel) ...` then calling it like `func({"myProperty":1});`
2017-10-19T13:27:04.000028
Kellye
pythondev_help_Kellye_2017-10-19T13:27:04.000028
1,508,419,624.000028
97,542
pythondev
help
I'm not an expert on this, but my understanding is that .pyi does not enforce a contract like that during run time
2017-10-19T13:31:27.000066
Sirena
pythondev_help_Sirena_2017-10-19T13:31:27.000066
1,508,419,887.000066
97,543
pythondev
help
if you want to enforce it, you need ```def func(arg1): if not isinstance(arg1, classname): raise TypeError('received incorrect type in argument 1')```
2017-10-19T13:33:44.000184
Sirena
pythondev_help_Sirena_2017-10-19T13:33:44.000184
1,508,420,024.000184
97,544
pythondev
help
or something like that
2017-10-19T13:33:58.000479
Sirena
pythondev_help_Sirena_2017-10-19T13:33:58.000479
1,508,420,038.000479
97,545
pythondev
help
also, I'm not sure I follow your example, if you want the property of MyModel, just use it ```def func(value: int): . . .``` ```func(MyModel.myProperty)```
2017-10-19T13:36:05.000331
Sirena
pythondev_help_Sirena_2017-10-19T13:36:05.000331
1,508,420,165.000331
97,546
pythondev
help
and while it may not be easy or possible to redesign, typically if you find yourself doing typechecks in python, it's possible and recommended to design them out
2017-10-19T13:38:30.000075
Sirena
pythondev_help_Sirena_2017-10-19T13:38:30.000075
1,508,420,310.000075
97,547
pythondev
help
none of this is hard and fast, just kind of a best practice when you aren't constrained by other factors
2017-10-19T13:40:37.000015
Sirena
pythondev_help_Sirena_2017-10-19T13:40:37.000015
1,508,420,437.000015
97,548
pythondev
help
that's was just an example, basically you end up having 5-10+ props and nested objects. As I referred before, TypeScript makes it possible - you can define an 'interface' that will just specify data layout, but will be cut out after static type checks.
2017-10-19T13:40:56.000412
Kellye
pythondev_help_Kellye_2017-10-19T13:40:56.000412
1,508,420,456.000412
97,549
pythondev
help
I'm just trying to figure out whether it's possible in python, there's not much information on pyi files
2017-10-19T13:41:44.000477
Kellye
pythondev_help_Kellye_2017-10-19T13:41:44.000477
1,508,420,504.000477
97,550
pythondev
help
basically resources recommends you to have .pyi files in same structure as your source code
2017-10-19T13:42:14.000405
Kellye
pythondev_help_Kellye_2017-10-19T13:42:14.000405
1,508,420,534.000405
97,551
pythondev
help
I'm not terribly familiar with TypeScript, maybe someone else can field your question on that, but most python interfaces rely on behaviors/methods rather than on types
2017-10-19T13:45:26.000624
Sirena
pythondev_help_Sirena_2017-10-19T13:45:26.000624
1,508,420,726.000624
97,552
pythondev
help
<@Sirena> thank you for your help! I'll prepare pseudo code so it's will be easier to explain
2017-10-19T13:46:55.000177
Kellye
pythondev_help_Kellye_2017-10-19T13:46:55.000177
1,508,420,815.000177
97,553
pythondev
help
ok
2017-10-19T13:47:01.000141
Sirena
pythondev_help_Sirena_2017-10-19T13:47:01.000141
1,508,420,821.000141
97,554
pythondev
help
Hi there, Im not a python developer but web/app developer. Im currently trying to import some files from another directory. Tried chdir and importing using sys but getting errors on the includes of the included file.
2017-10-19T16:05:54.000036
Maddie
pythondev_help_Maddie_2017-10-19T16:05:54.000036
1,508,429,154.000036
97,555
pythondev
help
Can someone help me with that?
2017-10-19T16:07:25.000360
Maddie
pythondev_help_Maddie_2017-10-19T16:07:25.000360
1,508,429,245.00036
97,556
pythondev
help
err, possibly? can you paste the relevant bits of code, and if possible the errors?
2017-10-19T16:07:53.000437
Sirena
pythondev_help_Sirena_2017-10-19T16:07:53.000437
1,508,429,273.000437
97,557
pythondev
help
if it's more than a few lines, feel free to create a snippet
2017-10-19T16:08:13.000243
Sirena
pythondev_help_Sirena_2017-10-19T16:08:13.000243
1,508,429,293.000243
97,558
pythondev
help
Uhh ok..
2017-10-19T16:08:17.000024
Maddie
pythondev_help_Maddie_2017-10-19T16:08:17.000024
1,508,429,297.000024
97,559
pythondev
help
(using the '+' button)
2017-10-19T16:08:18.000325
Sirena
pythondev_help_Sirena_2017-10-19T16:08:18.000325
1,508,429,298.000325
97,560
pythondev
help
i know, thanks
2017-10-19T16:08:25.000346
Maddie
pythondev_help_Maddie_2017-10-19T16:08:25.000346
1,508,429,305.000346
97,561
pythondev
help
Anyway what is a good ide for python dev ?
2017-10-19T16:08:43.000116
Maddie
pythondev_help_Maddie_2017-10-19T16:08:43.000116
1,508,429,323.000116
97,562
pythondev
help
PyCharm is mind blowing
2017-10-19T16:08:59.000208
Suellen
pythondev_help_Suellen_2017-10-19T16:08:59.000208
1,508,429,339.000208
97,563
pythondev
help
somewhat up to personal choice but I've used pycharm, vscode, and vim. There are others as well
2017-10-19T16:09:13.000002
Sirena
pythondev_help_Sirena_2017-10-19T16:09:13.000002
1,508,429,353.000002
97,564
pythondev
help
great ill give that a try, thanks! first try: ``` dir_path = os.path.dirname(os.path.realpath(__file__)) + '/resources/lib' os.chdir((dir_path)) import crunchy_json as crj ``` resulting in that the module can not be found second try: ``` dir_path = os.path.dirname(os.path.realpath(__file__)) + '/resources/lib' sys.path.insert(0, dir_path) import crunchy_json as crj ``` resulting that import X from crunchy_json’s first couple of lines could not be found
2017-10-19T16:10:40.000412
Maddie
pythondev_help_Maddie_2017-10-19T16:10:40.000412
1,508,429,440.000412
97,565
pythondev
help
There's some discussion of editor choice in <#C5CAD2J67|editors>
2017-10-19T16:11:01.000136
Antionette
pythondev_help_Antionette_2017-10-19T16:11:01.000136
1,508,429,461.000136
97,566
pythondev
help
I do not see that channel
2017-10-19T16:11:17.000396
Maddie
pythondev_help_Maddie_2017-10-19T16:11:17.000396
1,508,429,477.000396
97,567
pythondev
help
If you are in the slack client, click the highlight in the message, it should take you there
2017-10-19T16:11:42.000143
Beula
pythondev_help_Beula_2017-10-19T16:11:42.000143
1,508,429,502.000143
97,568
pythondev
help
Haha okay, its been a long day, thanks :stuck_out_tongue:
2017-10-19T16:12:13.000466
Maddie
pythondev_help_Maddie_2017-10-19T16:12:13.000466
1,508,429,533.000466
97,569
pythondev
help
No worries!
2017-10-19T16:12:41.000100
Beula
pythondev_help_Beula_2017-10-19T16:12:41.000100
1,508,429,561.0001
97,570
pythondev
help
<@Sirena> did you have a look at the code i’ve just posted?
2017-10-19T16:14:42.000159
Maddie
pythondev_help_Maddie_2017-10-19T16:14:42.000159
1,508,429,682.000159
97,571
pythondev
help
should be something simple, im overlooking.
2017-10-19T16:15:21.000397
Maddie
pythondev_help_Maddie_2017-10-19T16:15:21.000397
1,508,429,721.000397
97,572
pythondev
help
It's generally not a good idea to change your `sys.path`, unless it's something like a plug-in system?
2017-10-19T16:15:55.000218
Suellen
pythondev_help_Suellen_2017-10-19T16:15:55.000218
1,508,429,755.000218
97,573
pythondev
help
Im trying to improve a kodi addon. the addon it self has some files in the root and then the rest of the code resources/lib etc. In the root i need to setup a monitor that uses parts of the code in resources/lib
2017-10-19T16:17:36.000026
Maddie
pythondev_help_Maddie_2017-10-19T16:17:36.000026
1,508,429,856.000026
97,574
pythondev
help
should it be something like `from resources.lib import module_x` ?
2017-10-19T16:18:36.000533
Maddie
pythondev_help_Maddie_2017-10-19T16:18:36.000533
1,508,429,916.000533
97,575
pythondev
help
try printing dir_path before the insert line, is it actually the path you are expecting?
2017-10-19T16:20:12.000292
Sirena
pythondev_help_Sirena_2017-10-19T16:20:12.000292
1,508,430,012.000292
97,576
pythondev
help
yeah something like that
2017-10-19T16:20:22.000534
Maddie
pythondev_help_Maddie_2017-10-19T16:20:22.000534
1,508,430,022.000534
97,577
pythondev
help
I tried that but that it returns errors on the imports that live in crunchy_json
2017-10-19T16:21:14.000513
Maddie
pythondev_help_Maddie_2017-10-19T16:21:14.000513
1,508,430,074.000513
97,578
pythondev
help
Yeah, Mark, it is likely that `crunchy_json` does absolute imports
2017-10-19T16:21:50.000579
Beula
pythondev_help_Beula_2017-10-19T16:21:50.000579
1,508,430,110.000579
97,579
pythondev
help
You may have to do the `pip install -e path/to/my/version` route
2017-10-19T16:22:16.000289
Beula
pythondev_help_Beula_2017-10-19T16:22:16.000289
1,508,430,136.000289
97,580
pythondev
help
That installs it in "editable" mode (kind of like a symlink) and as you make changes in the lib it will reflect in the other environment you import it into
2017-10-19T16:22:36.000255
Beula
pythondev_help_Beula_2017-10-19T16:22:36.000255
1,508,430,156.000255
97,581
pythondev
help
(note you will need to re-import it)
2017-10-19T16:22:47.000452
Beula
pythondev_help_Beula_2017-10-19T16:22:47.000452
1,508,430,167.000452
97,582
pythondev
help
Okay thanks, ill look into that..
2017-10-19T16:23:17.000387
Maddie
pythondev_help_Maddie_2017-10-19T16:23:17.000387
1,508,430,197.000387
97,583
pythondev
help
i’ve tried from resources.lib import crunchy_json and it looks like it does a little more but then it errors on a include that includes a sub part crunchy_json. but it looks promising, thanks for the assist
2017-10-19T16:26:06.000337
Maddie
pythondev_help_Maddie_2017-10-19T16:26:06.000337
1,508,430,366.000337
97,584
pythondev
help
is there a more elegant way for conditionally assigning a variable based on the parameter passed in the function other than a couple `if` statements? ```def foo(bar): if bar is 'this': .... if bar is 'that': ....``` It almost seems like the spot for case statements but that doesn't seem to be a better solution imo. The reason I'm using strings is because I am actually checking strings as the condition.
2017-10-19T16:31:57.000178
Susann
pythondev_help_Susann_2017-10-19T16:31:57.000178
1,508,430,717.000178
97,585
pythondev
help
In a very shortened form: `x = {'this': 1, 'that': 2}[bar]`
2017-10-19T16:33:17.000111
Suellen
pythondev_help_Suellen_2017-10-19T16:33:17.000111
1,508,430,797.000111
97,586
pythondev
help
will this work for you?
2017-10-19T16:33:32.000528
Suellen
pythondev_help_Suellen_2017-10-19T16:33:32.000528
1,508,430,812.000528
97,587
pythondev
help
haven't seen that done before. that's perfect!
2017-10-19T16:35:27.000358
Susann
pythondev_help_Susann_2017-10-19T16:35:27.000358
1,508,430,927.000358
97,588
pythondev
help
<@Suellen> :taco:
2017-10-19T16:35:36.000571
Susann
pythondev_help_Susann_2017-10-19T16:35:36.000571
1,508,430,936.000571
97,589
pythondev
help
Might be obvious but I think its worth pointing out that a key error will be thrown if bar is not something you are expecting
2017-10-19T16:40:33.000550
Antionette
pythondev_help_Antionette_2017-10-19T16:40:33.000550
1,508,431,233.00055
97,590
pythondev
help
Then `x = {'this': 1, 'that': 2}.get('bar', 'default')`
2017-10-19T16:42:23.000273
Jenise
pythondev_help_Jenise_2017-10-19T16:42:23.000273
1,508,431,343.000273
97,591
pythondev
help
well it was a shortened example :slightly_smiling_face:
2017-10-19T16:45:11.000473
Suellen
pythondev_help_Suellen_2017-10-19T16:45:11.000473
1,508,431,511.000473
97,592
pythondev
help
that might actually be nice to wrap in a try/except because I am expecting specific strings and don't want it to continue on if I got something I'm not expecting
2017-10-19T16:46:37.000100
Susann
pythondev_help_Susann_2017-10-19T16:46:37.000100
1,508,431,597.0001
97,593
pythondev
help
because... _I don't trust users!_
2017-10-19T16:51:10.000128
Susann
pythondev_help_Susann_2017-10-19T16:51:10.000128
1,508,431,870.000128
97,594
pythondev
help
Is anyone familiar with the Decimal module rounding schemas? Why can't I find a normal rounding schema?
2017-10-19T16:55:12.000445
Alonso
pythondev_help_Alonso_2017-10-19T16:55:12.000445
1,508,432,112.000445
97,595
pythondev
help
<https://docs.python.org/3/library/decimal.html#rounding-modes>
2017-10-19T17:00:39.000017
Antionette
pythondev_help_Antionette_2017-10-19T17:00:39.000017
1,508,432,439.000017
97,596
pythondev
help
I think it would be hard to call one "normal", they're all used in different circumstances
2017-10-19T17:00:59.000481
Antionette
pythondev_help_Antionette_2017-10-19T17:00:59.000481
1,508,432,459.000481
97,597
pythondev
help
yeah, none of them are "if the decimal ends in 0 to 4, round down, else round up" scenarios
2017-10-19T17:01:30.000385
Alonso
pythondev_help_Alonso_2017-10-19T17:01:30.000385
1,508,432,490.000385
97,598
pythondev
help
the default is more 0 to 4 round down, 6 to 9 round up, a tie rounds to an even number
2017-10-19T17:02:09.000472
Alonso
pythondev_help_Alonso_2017-10-19T17:02:09.000472
1,508,432,529.000472
97,599
pythondev
help
that would be ROUND_HALF_EVEN
2017-10-19T17:03:18.000307
Antionette
pythondev_help_Antionette_2017-10-19T17:03:18.000307
1,508,432,598.000307
97,600
pythondev
help
Round to nearest with ties going to nearest even integer
2017-10-19T17:03:59.000211
Alonso
pythondev_help_Alonso_2017-10-19T17:03:59.000211
1,508,432,639.000211
97,601
pythondev
help
nearest even integer? why??
2017-10-19T17:04:15.000583
Alonso
pythondev_help_Alonso_2017-10-19T17:04:15.000583
1,508,432,655.000583
97,602