[issue30426] why not use the same style func name. eg: int.to_bytes (with underline) and array.tobytes(without underline).

2017-05-22 Thread jf

Changes by jf <zaa...@163.com>:


--
title: why not use the same style func name. eg: int.to_bytes (with underline 
or not) and array.tobytes(). -> why not use the same style func name. eg: 
int.to_bytes (with underline) and array.tobytes(without underline).

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



[issue30426] why not use the same style func name. eg: int.to_bytes (with underline or not) and array.tobytes().

2017-05-22 Thread jf

New submission from jf:

I note that, some functions have different style names, some have underline, 
and some not. why do so??

eg:
int.to_bytes()  and array.tobytes()
int.from_byte() and array.frombytes()
ZipInfo.from_file() and array.fromfile()
...

--
components: Library (Lib)
messages: 294127
nosy: zaazbb
priority: normal
severity: normal
status: open
title: why not use the same style func name. eg: int.to_bytes (with underline 
or not) and array.tobytes().
versions: Python 3.7

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



[issue28034] local var in "for v in iter" modify the uplevel var value.

2016-09-08 Thread jf

New submission from jf:

eg:

s = 'aaa'
print(s)
for s in '111', '222', '333':
print(s)
print(s)

the right result should be:
'aaa'
'111'
'222'
'333'
'aaa'

but, i got:
'aaa'
'111'
'222'
'333'
'333'

the local var in "for v in iter", modify the uplevel var value.
Is it wrong?

--
components: Interpreter Core
messages: 275233
nosy: zaazbb
priority: normal
severity: normal
status: open
title: local var in "for v in iter" modify the uplevel var value.
type: behavior
versions: Python 3.5

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



[issue23831] tkinter canvas lacks of moveto method.

2016-08-29 Thread jf

jf added the comment:

i met the same problem, when i translate knighstour.tcl(upder tk demos dir) to 
tkinter.

--
nosy: +zaazbb

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



[issue16448] 'module' object has no attribute 'font' when import tkinter only.

2012-11-10 Thread jf

New submission from jf:

when i use tkinter.font, i meet a error 'module' object has no attribute 
'font'. if i add import tkinter.font, it's no error.

but when i use tkinter,messagebox, it's no error without import 
tkinter.messagebox.

and, under the tkinter folder, messagebox.py and font.py have the same 
hierarchical filesystem.

why they have different import method?

here is my code:
1)tkinter.font -- only use import tkinter meet a error, must add import 
tkinter.font.code is below:

import tkinter
#import tkinter.font
root = tkinter.Tk()
ft = tkinter.font.Font(family = 'Fixdsys',size = 20,weight = tkinter.font.BOLD)
tkinter.Label(root,text = 'hello sticky',font = ft ).grid()
root.mainloop()

2)tkinter.messagebox -- only use import tkinter is all ok.code is below:

import tkinter
def callback():
if tkinter.messagebox.askokcancel(Quit, Do you really wish to quit?):
root.destroy()
root = tkinter.Tk()
root.protocol(WM_DELETE_WINDOW, callback)
root.mainloop()


i am a beginner on python. if have a reply, please email me. thinks.

--
components: Tkinter
messages: 175267
nosy: zaazbb
priority: normal
severity: normal
status: open
title: 'module' object has no attribute 'font' when import tkinter only.
type: compile error
versions: Python 3.3

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



[issue16448] 'module' object has no attribute 'font' when import tkinter only.

2012-11-10 Thread jf

jf added the comment:

when i use tkinter.font, i meet a error 'module' object has no attribute 
'font'. if i add import tkinter.font, it's no error.

but when i use tkinter,messagebox, it's no error without import 
tkinter.messagebox.

and, under the tkinter folder, messagebox.py and font.py have the same 
hierarchical filesystem.

why they have different import method?

here is my code:
1)tkinter.font -- only use import tkinter meet a error, must add import 
tkinter.font.code is below:

import tkinter
#import tkinter.font
root = tkinter.Tk()
ft = tkinter.font.Font(family = 'Fixdsys',size = 20,weight = tkinter.font.BOLD)
tkinter.Label(root,text = 'hello sticky',font = ft ).grid()
root.mainloop()

2)tkinter.messagebox -- only use import tkinter is all ok.code is below:

import tkinter
def callback():
if tkinter.messagebox.askokcancel(Quit, Do you really wish to quit?):
root.destroy()
root = tkinter.Tk()
root.protocol(WM_DELETE_WINDOW, callback)
root.mainloop()


i am a beginner on python. if have a reply, please email me. thanks.

--

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