@Override
    public Void visitIntegerLiteral(final GremlinParser.IntegerLiteralContext ctx) {
        String integerLiteral = ctx.getText().toLowerCase();

        // check suffix
        int lastCharIndex = integerLiteral.length() - 1;
        char lastChar = integerLiteral.charAt(lastCharIndex);

        // if the last character is not alphabetic then try to interpret the right type and append the suffix
        if (!Character.isAlphabetic(lastChar)) {
            final BigInteger bi = new BigInteger(integerLiteral);

            // get explicit about long
            if (bi.bitLength() > 32) {
                integerLiteral = integerLiteral + "l";
                lastChar = 'l';
                lastCharIndex++;
            }
        }

        switch (lastChar) {
            case 'b':
            case 's':
            case 'i':
                sb.append(integerLiteral, 0, lastCharIndex);
                break;
            case 'n':
                sb.append("bigint(");
                sb.append(integerLiteral, 0, lastCharIndex);
                sb.append(")");
                break;
            case 'l':
                sb.append("long(");
                sb.append(integerLiteral, 0, lastCharIndex);
                sb.append(")");
                break;
            default:
                // everything else just goes as specified
                sb.append(integerLiteral);
                break;
        }
        return null;
    }
Converts a Gremlin traversal string into a Python source code representation of that traversal with an aim at
sacrificing some formatting for the ability to compile correctly.
<ul>
    <li>Range syntax has no direct support</li>
    <li>Normalizes whitespace</li>
    <li>If floats are not suffixed they will translate as BigDecimal</li>
    <li>Makes anonymous traversals explicit with double underscore</li>
    <li>Makes enums explicit with their proper name</li>
</ul>
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/language/translator/PythonTranslateVisitor.java