Git Product home page Git Product logo

pyfmt's People

Contributors

slongfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyfmt's Issues

using `&` I'm unable to access nested structs in a map[string]interface?

Hey good job, this looks great.

I've been playing with the getElement function, Not sure if this is even a bug but I wanted your comments.

What I'm trying to do is access foo.bar.someStruct.someProp, usually from a slice of structs but for today from a map[string]interface{}.

I cant access anything with & somestruct{...}, with no ampersend its fine

type b struct {
Bazzer int
Bazzle []int
}

func main() {
a := map[string]interface{} {
	"bar"   : map[string]interface{} {
			"baz": &b{0,[]int{1,2,3}},
			"buzz": []int{1,2,3} },
	"baz"   : []int{1,2,3},
	"bazzle": []string{"1","2","3"} }

b,err := getElement("bar.baz.Bazzle[0]",0,a)
fmt.Println(b,err)
}

Expected output: one of the struct members,
Actual output: attempted to get item by name in non-struct, non-map
If I drop the & before the struct &b {...} it works fine.

thoughts?

sorry if not a bug, I noticed this while I was just giving a quick evaluation of whether the software if it will work for my purposes. Cheers it looks great.

Integration with gpython?

Hi @slongfield

We are considering using pyfmt with gpython to add .format support. Is this something you'd be interested in helping support or at least bless? Your efforts and support would be welcome but the ask would be for you to consider merging any minor PRs to pyfmt that make good sense. I think pyfmt is perfect for gpython!

Best,
Drew

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.