[issue24001] Clinic: use raw types in types= set

2015-05-04 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 41fb7fd04b5d by Larry Hastings in branch 'default':
Issue #24001: Argument Clinic converters now use accept={type}
https://hg.python.org/cpython/rev/41fb7fd04b5d

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-05-04 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-20 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Usually converters are named by the C type of the result. May be rename the 
str converter to pchar?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-20 Thread Larry Hastings

Larry Hastings added the comment:

Attached is a patch implementing all my proposed changes here:

* types is now renamed accept
* it accepts a set of real Python types
* there are placeholder types for buffer, robuffer, rwbuffer
* nullable=True is gone, replaced with adding NoneType to accept={}

--
Added file: http://bugs.python.org/file39145/larry.clinic.use.raw.types.3.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as this is a patch for different issue.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings

Larry Hastings added the comment:

Here's the right patch.

--
Added file: http://bugs.python.org/file39128/larry.clinic.use.raw.types.2.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


Removed file: 
http://bugs.python.org/file39122/larry.one.more.clinic.format.unit.map.cleanup.2.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings

Larry Hastings added the comment:

Whoops.  I'll fix that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-19 Thread Larry Hastings

Larry Hastings added the comment:

Thanks to #24002 I now know how to write evalify_node properly.  This revision 
of the patch is much better, and maybe ready for checkin.

--
Added file: 
http://bugs.python.org/file39122/larry.one.more.clinic.format.unit.map.cleanup.2.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Larry Hastings

New submission from Larry Hastings:

New proposed semantics for the types= parameter to converters: where possible, 
pass in actual types.  The resulting syntax:

  c: int(types={str}) # maps to 'U'
  s: str(types={str, robuffer}, length=True, zeroes=True) # maps to 's#'

Since buffer, robuffer, and rwbuffer are fake pseudotypes, I created 
empty classes with those names.

Serhiy: with this change in place, the types= parameter uses almost the same 
number of characters as it used to when it was a string.  (The new syntax 
requires commas between elements, so for two or more types it's slightly 
longer.)  Yet this makes the types= parameter far more accurate in illustrating 
what it's supposed to represent.

Does this make you happy? :)

--
assignee: larry
components: Argument Clinic
files: larry.clinic.use.raw.types.1.txt
messages: 241469
nosy: larry, serhiy.storchaka, zach.ware
priority: normal
severity: normal
stage: patch review
status: open
title: Clinic: use raw types in types= set
type: enhancement
Added file: http://bugs.python.org/file39114/larry.clinic.use.raw.types.1.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Larry Hastings

Larry Hastings added the comment:

Should types= be renamed accept= ?  It's a set of the types of the Python 
objects that this parameter should accept.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Larry Hastings

Larry Hastings added the comment:

I should mention that evalify_node() is pretty hacked up here, and is not ready 
to be checked in.  (I'm proposing separately that we simply add something like 
this directly into the standard library, see issue #24002.)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24001] Clinic: use raw types in types= set

2015-04-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

accept= (or accept_types=) LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24001
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com