kragniz / json-sempai

Use JSON files as if they are python modules
MIT License
1.25k stars 52 forks source link

notice #14

Closed jontonsoup4 closed 8 years ago

jontonsoup4 commented 8 years ago

Description

In order to thematically maintain the senpai narrative of json, I propose keeping in character by changing the implementation of imports to notice. Since the current preferred method is importing magic which essentially does the same thing as imports, changing this method to senpai will keep with the theme and allow jsonsenpai to notice me.

In addition, imp is a depreciated lib, so I changed that to types instead. The same functionality takes place. I also cleaned up some formatting because senpai likes his code neat.

Before

with jsonsempai.imports():
    import me

After

with jsonsempai.notice():
    import me
AbstractBeliefs commented 8 years ago

:+1: pls merge this thx

Cediddi commented 8 years ago

+1 I think this PR really improves the application.

nbasu02 commented 8 years ago

Wouldn't it be better to have these names as aliases for the existing functions? We don't want to break existing code that relies on this library.

jontonsoup4 commented 8 years ago

If you're currently doing the long handed imports instead of the one line magic, you don't deserve to be noticed by senpai

Cediddi commented 8 years ago

Or rather, you don't deserve to be noticed by senpai.

On Jan 25 2016, at 9:16 pm, Jonathan Reed <notifications@github.com> wrote:

If you're currently doing the long handed imports instead of the one line magic, senpai doesn't deserve to notice you


Reply to this email directly or view it on GitHub.

AlexHLPham commented 8 years ago

crucial update pls notice.

zig-for commented 8 years ago

Is it possible to allow

notice my_json_file

?

milkey-mouse commented 8 years ago

@nbasu02 You say that as if something would rely on this library.

nbasu02 commented 8 years ago

@milkey-mouse that's the joke

hyonschu commented 8 years ago

this is the first github commit i slow clapped

jontonsoup4 commented 8 years ago

I added back an alias for the legacy imports() meaning that previous dependencies on this module will not be broken. This PR now has thematic importance as well as backwards compatibility back to any applications running this on 2.6