GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-40801: Add operator.as_float by mdickinson · Pull Request #20481 · python/cpython

Conversation

@mdickinson

@mdickinson mdickinson commented May 28, 2020 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

This PR exposes PyFloat_AsDouble to Python level in the form operator.as_float. This provides a way for Python code to emulate the implicit float conversions that Python itself does at C level.

https://bugs.python.org/issue40801

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mdickinson
Add operator.as_float
3fb7413
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 28, 2020
@bedevere-bot bedevere-bot added the awaiting core review label May 28, 2020
@mdickinson
Add missing versionadded
34ebbae
mdickinson
mdickinson commented May 28, 2020
View reviewed changes
Comment thread Doc/library/operator.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

mdickinson
mdickinson commented May 28, 2020
View reviewed changes
Comment thread Lib/operator.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

mdickinson
mdickinson commented May 28, 2020
View reviewed changes
Comment thread Lib/operator.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@mdickinson mdickinson added the type-feature A feature request or enhancement label May 28, 2020
@mdickinson
Fix docstring typo; exclude buffers
ef94333
csabella
csabella reviewed May 28, 2020
View reviewed changes
Comment thread Lib/operator.py
pass

if bad_type:
raise TypeError(f"must be real number, not {obj.__class__.__name__}")

@csabella csabella May 28, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Do you mean real number in the math sense? Or do you mean it as instead of a string representation of a number?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@mdickinson mdickinson May 28, 2020

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

In the mathematical sense. But this wording isn't new to this PR; it's copied from here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@csabella csabella May 28, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks. That makes sense. :-)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mdickinson
mdickinson marked this pull request as draft May 29, 2020 09:59
@mdickinson

mdickinson commented May 29, 2020

Copy link
Copy Markdown
Member Author

Converted this PR to draft; the feature is still under discussion.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdickinson mdickinson closed this Jun 12, 2021
@mdickinson
mdickinson deleted the feature/operator-as-float branch June 12, 2021 08:59
@mdickinson mdickinson mentioned this pull request Oct 6, 2023
Expose PyFloat_AsDouble at Python level: operator.as_float? #84978
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@csabella csabella csabella left review comments
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner will be requested when the pull request is marked ready for review AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting core review type-feature A feature request or enhancement

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mdickinson @csabella @the-knights-who-say-ni @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.