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 — Add support for method on instance as function name with '.' separator syntax by ksmoore17 · Pull Request #74 · HDE/python-lambda-local

Conversation

@ksmoore17

@ksmoore17 ksmoore17 commented Dec 22, 2020

Copy link
Copy Markdown
Contributor

This allows providing instance.method to the -f flag to indicate that the function is nested in another object.

It could also allow multiple levels of nesting as it loops into the '.' separated names to resolve the object.

Resolves #73

Sorry, something went wrong.

Uh oh!

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

All reactions
@ksmoore17
Add nested function support for '.' separator syntax
fd84ced
freedomofkeima
freedomofkeima approved these changes Dec 28, 2020
View reviewed changes

@freedomofkeima freedomofkeima left a comment

Copy link
Copy Markdown
Collaborator

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.

Hi, thank you for the pull request!

Sorry for the late reply... So far it looks good, could you also update the README file about this specific usage?

Thank you!

Sorry, something went wrong.

Uh oh!

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

All reactions
@ksmoore17

ksmoore17 commented Jan 17, 2021

Copy link
Copy Markdown
Contributor Author

Sorry for ghosting. I've worked with this more and I don't think it's a good pattern. Specifically, the python extension for the serverless framework implements similar behavior, except that it will go into nested modules, but not into nested python objects. I think this library handles that.

Either way I've found that a more standard approach just forwards the invocation from a handler.py type file to the desired method, if anyone is interested in doing something similar with grouping lambdas' handling logic in a python class.

All reactions

Sorry, something went wrong.

Uh oh!

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

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

Reviewers

@freedomofkeima freedomofkeima freedomofkeima approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Instance method as function name in command line

Uh oh!

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

2 participants

@ksmoore17 @freedomofkeima
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.