GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — use config.every rather than config.last for configHandlers · fuzz-security/java2python@150e5ce

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • java2python/compiler
    • template.py
  • test/configs
    • Class10.py
    • Interface1.py
    • defaults.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎java2python/compiler/template.py‎

Copy file name to clipboardExpand all lines: java2python/compiler/template.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def configHandler(self, part, suffix='Handler', default=None):
173173
def configHandlers(self, part, suffix='Handlers'):
174174
""" Returns config handlers for this type of template """
175175
name = '{0}{1}{2}'.format(self.typeName, part, suffix)
176-
return imap(self.toIter, self.config.last(name, ()))
176+
return imap(self.toIter, chain(*self.config.every(name, [])))
177177

178178
def dump(self, fd, level=0):
179179
""" Writes the Python source code for this template to the given file. """
Collapse file

‎test/configs/Class10.py‎

Copy file name to clipboard
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from java2python.config.default import modulePrologueHandlers
2-
3-
modulePrologueHandlers += [
1+
modulePrologueHandlers = [
42
'from java2python.mod.include.overloading import overloaded',
53
'from abc import ABCMeta, abstractmethod',
64
]
Collapse file

‎test/configs/Interface1.py‎

Copy file name to clipboard
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from java2python.config.default import modulePrologueHandlers
2-
3-
modulePrologueHandlers += [
1+
modulePrologueHandlers = [
42
"from abc import ABCMeta, abstractmethod",
53
]
Collapse file

‎test/configs/defaults.py‎

Copy file name to clipboardExpand all lines: test/configs/defaults.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
from java2python.config import default
4-
5-
6-
modulePrologueHandlers = default.modulePrologueHandlers + [
3+
modulePrologueHandlers = [
74
'from java2python.mod.include.classmethod import classmethod_ as classmethod',
85
'from java2python.mod.include.overloading import overloaded',
96
'from abc import ABCMeta, abstractmethod',

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.