Issue2183

classification
Title: attributes like __defaults__ in function missed in Jython 2.7
Type: behaviour Severity: normal
Components: Core Versions: Jython 2.7
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: jhonglei, zyasoft
Priority: Keywords: patch

Created on 2014-07-28.12:57:04 by jhonglei, last changed 2014-10-05.16:34:21 by zyasoft.

Files
File name Uploaded Description Edit Remove
patch.diff nonameentername, 2014-09-22.19:10:34
Messages
msg8896 (view) Author: honglei jiang (jhonglei) Date: 2014-07-28.12:57:03
Jython 2.7b3 (default:5efdcedc9817, Jun 28 2014, 19:17:21)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.8.0_05
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
...     pass
...
>>> dir(f)
['__call__', '__class__', '__code__', '__delattr__', '__dict__', '__doc__', '__f
ormat__', '__get__', '__getattribute__', '__globals__', '__hash__', '__init__',
'__module__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__str__', '__subclasshook__', 'func_closure', 'func_code', 'func
_defaults', 'func_dict', 'func_doc', 'func_globals', 'func_name']
>>>


Python 2.7.6 (default, Nov 10 2013, 19:24:24) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
...    pass
...
>>> f.__defaults__
>>> dir(f)
['__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr_
_', '__dict__', '__doc__', '__format__', '__get__', '__getattribute__', '__globa
ls__', '__hash__', '__init__', '__module__', '__name__', '__new__', '__reduce__'
, '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subcla
sshook__', 'func_closure', 'func_code', 'func_defaults', 'func_dict', 'func_doc'
, 'func_globals', 'func_name']
>>>
msg9005 (view) Author: Jim Baker (zyasoft) Date: 2014-09-16.23:08:23
New since 2.7 as a synonym for func_defaults. We should of course implement. Also __closure__ for func_closure.

Target beta 4
msg9017 (view) Author: Jim Baker (zyasoft) Date: 2014-09-23.03:43:08
Fixed as of https://hg.python.org/jython/rev/d5df69a9fac0
History
Date User Action Args
2014-10-05 16:34:21zyasoftsetstatus: pending -> closed
2014-09-23 03:43:08zyasoftsetstatus: open -> pending
resolution: accepted -> fixed
messages: + msg9017
2014-09-22 19:10:34nonameenternamesetfiles: + patch.diff
keywords: + patch
2014-09-16 23:08:24zyasoftsetassignee: zyasoft
resolution: accepted
messages: + msg9005
nosy: + zyasoft
2014-07-28 12:57:04jhongleicreate