Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 181 #183

Merged
merged 2 commits into from
Mar 7, 2016
Merged

Fix issue 181 #183

merged 2 commits into from
Mar 7, 2016

Conversation

muddyfish
Copy link
Contributor

Extends }, Pin so it functions for cases where A > B

Extends `}`, Pin so it functions for cases where A > B
@jakobkogler
Copy link
Contributor

Hi Simon.
Can you add one or two test cases to test.py?
This way we can automatically see if the implementation works.

On Sat, Mar 5, 2016, 3:22 PM Simon Beal notifications@github.com wrote:

Extends }, Pin so it functions for cases where A > B

You can view, comment on, or merge this pull request online at:

#183
Commit Summary

  • Fix issue 181

File Changes

Patch Links:


Reply to this email directly or view it on GitHub
#183.

@muddyfish
Copy link
Contributor Author

I've just added some test cases (just so you know, test.py doesn't work under python3.5)

@jakobkogler
Copy link
Contributor

@muddyfish Are you sure? What is exactly the problem?
I'm running Python 3.5.1 and it works fine for me.

@muddyfish
Copy link
Contributor Author

I'm on python 3.5.0, failing with TypeError: Required argument 'user_function' (pos 1) not found in

Traceback (most recent call last):
  File "test.py", line 860, in <module>
    test(*test_case)
  File "test.py", line 839, in test
    output, error = pyth.run_code(pyth_code, input_message)
  File "d:\Python\pyth\pyth\pyth.py", line 568, in run_code
    saved_env = c.deepcopy(environment)
  File "c:\ProgramData\chocolatey\lib\python3\tools\lib\copy.py", line 155, in deepcopy
    y = copier(x, memo)
  File "c:\ProgramData\chocolatey\lib\python3\tools\lib\copy.py", line 244, in _deepcopy_dict
    y[deepcopy(key, memo)] = deepcopy(value, memo)
  File "c:\ProgramData\chocolatey\lib\python3\tools\lib\copy.py", line 182, in deepcopy
    y = _reconstruct(x, rv, 1, memo)
  File "c:\ProgramData\chocolatey\lib\python3\tools\lib\copy.py", line 293, in _reconstruct
    y = callable(*args)
  File "c:\ProgramData\chocolatey\lib\python3\tools\lib\copyreg.py", line 88, in __newobj__
    return cls.__new__(cls, *args)
TypeError: Required argument 'user_function' (pos 1) not found

I believe this is because lru_cache fails to deepcopy properly in my version. (I installed 3.3 and it worked fine)

isaacg1 added a commit that referenced this pull request Mar 7, 2016
@isaacg1 isaacg1 merged commit ee0a7b2 into isaacg1:master Mar 7, 2016
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.

3 participants