Skip to content

Conversation

@dignissimus
Copy link
Contributor

@dignissimus dignissimus commented Apr 1, 2022

This allows attributes to be set like this

with decimal.localcontext(prec=10):
    ...

instead of like this

with decimal.localcontext() as ctx:
    ctx.prec = 10
    ...

#91291

https://bugs.python.org/issue47135

@dignissimus
Copy link
Contributor Author

Thank you for the review, I'll be able to make the changes later today

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good apart from one nit which I'll apply myself. Then I'll also run this through the buildbots in case there's a refleak.

@JelleZijlstra JelleZijlstra changed the title bpo-47135: Accept attributes as keyword arguments in decimal.localcontext gh-91291: Accept attributes as keyword arguments in decimal.localcontext Apr 14, 2022
@JelleZijlstra JelleZijlstra added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 14, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit df3ab57 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Apr 14, 2022
@vstinner
Copy link
Member

It seems like this change caused a regression: #91821

@dignissimus
Copy link
Contributor Author

Oh, interesting. I'll try and work out where the issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants